From ab46a451cf1c94b01e8718e2aa6be6c7fc1886c1 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 16 八月 2024 15:32:50 +0800 Subject: [PATCH] 合并代码 --- ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index a22d9b5..f28abf0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -8,10 +8,7 @@ <id property="roleId" column="role_id" /> <result property="roleName" column="role_name" /> <result property="roleKey" column="role_key" /> - <result property="roleSort" column="role_sort" /> <result property="dataScope" column="data_scope" /> - <result property="menuCheckStrictly" column="menu_check_strictly" /> - <result property="deptCheckStrictly" column="dept_check_strictly" /> <result property="status" column="status" /> <result property="delFlag" column="del_flag" /> <result property="createBy" column="create_by" /> @@ -22,8 +19,8 @@ </resultMap> <sql id="selectRoleVo"> - select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, - r.status, r.del_flag, r.create_time, r.remark ,r.carDataAuth,r.carTrainOperAuth,r.contractDataAuth + select distinct r.role_id, r.role_name, r.role_key, r.data_scope, + r.status, r.del_flag, r.create_time, r.remark from sys_role r left join sys_user_role ur on ur.role_id = r.role_id left join sys_user u on u.user_id = ur.user_id @@ -53,7 +50,6 @@ </if> <!-- 数据范围过滤 --> ${params.dataScope} - order by r.role_sort </select> <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> @@ -167,9 +163,11 @@ <select id="getSysRoleByIds" resultMap="SysRoleResult"> <include refid="selectRoleVo"/> - where id in - <foreach collection="ids" item="item" index="index" separator="," open="(" close=")"> - #{item} - </foreach> + <if test="null != ids and ids.size() > 0"> + where r.id in + <foreach collection="ids" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </if> </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1