From 2af534eea471f4adb104906c7a814bcc66d4d68d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 13 九月 2021 13:03:58 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index 5440f4f..87bdc63 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -42,6 +42,9 @@ <select id="selectPageRoleList" parameterType="SysRole" resultMap="SysRoleResult"> <include refid="selectRoleVo"/> where r.del_flag = '0' + <if test="role.roleId != null and role.roleId != 0"> + AND r.role_id = #{role.roleId} + </if> <if test="role.roleName != null and role.roleName != ''"> AND r.role_name like concat('%', #{role.roleName}, '%') </if> @@ -58,13 +61,18 @@ and date_format(r.create_time,'%y%m%d') <= date_format(#{role.params.endTime},'%y%m%d') </if> <!-- 鏁版嵁鑼冨洿杩囨护 --> - ${role.params.dataScope} + <if test="role.params.dataScope != null and role.params.dataScope != ''"> + AND ( ${role.params.dataScope} ) + </if> order by r.role_sort </select> <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult"> <include refid="selectRoleVo"/> where r.del_flag = '0' + <if test="roleId != null and roleId != 0"> + AND r.role_id = #{roleId} + </if> <if test="roleName != null and roleName != ''"> AND r.role_name like concat('%', #{roleName}, '%') </if> @@ -81,7 +89,9 @@ and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') </if> <!-- 鏁版嵁鑼冨洿杩囨护 --> - ${params.dataScope} + <if test="params.dataScope != null and params.dataScope != ''"> + AND ( ${params.dataScope} ) + </if> order by r.role_sort </select> -- Gitblit v1.9.3