From da0c86dd546e8f4f8e6083a008920278da90b661 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 01 六月 2022 13:06:42 +0800 Subject: [PATCH] update mybatis-plus 3.5.1 => 3.5.2 解决新版本兼容性问题 关键字冲突修改 --- ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 12 ++++++------ ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java | 2 +- pom.xml | 2 +- ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml | 18 +++++++++--------- ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 10 +++++----- ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml | 4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 7a945f4..232ac94 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ <easyexcel.version>3.1.0</easyexcel.version> <velocity.version>2.3</velocity.version> <satoken.version>1.30.0</satoken.version> - <mybatis-plus.version>3.5.1</mybatis-plus.version> + <mybatis-plus.version>3.5.2</mybatis-plus.version> <p6spy.version>3.9.1</p6spy.version> <hutool.version>5.8.2</hutool.version> <okhttp.version>4.9.3</okhttp.version> diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 2f9d002..6525d31 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -68,7 +68,7 @@ .orderByAsc(SysMenu::getOrderNum)); } else { QueryWrapper<SysMenu> wrapper = Wrappers.query(); - wrapper.eq("ur.user_id", userId) + wrapper.eq("sur.user_id", userId) .like(StringUtils.isNotBlank(menu.getMenuName()), "m.menu_name", menu.getMenuName()) .eq(StringUtils.isNotBlank(menu.getVisible()), "m.visible", menu.getVisible()) .eq(StringUtils.isNotBlank(menu.getStatus()), "m.status", menu.getStatus()) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index 08838c5..2f69197 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -32,8 +32,8 @@ m.perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role ro on ur.role_id = ro.role_id + left join sys_user_role sur on rm.role_id = sur.role_id + left join sys_role ro on sur.role_id = ro.role_id ${ew.getCustomSqlSegment} </select> @@ -55,9 +55,9 @@ m.create_time from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role ro on ur.role_id = ro.role_id - left join sys_user u on ur.user_id = u.user_id + left join sys_user_role sur on rm.role_id = sur.role_id + left join sys_role ro on sur.role_id = ro.role_id + left join sys_user u on sur.user_id = u.user_id where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0' @@ -81,18 +81,18 @@ select distinct m.perms from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id + left join sys_user_role sur on rm.role_id = sur.role_id </select> <select id="selectMenuPermsByUserId" parameterType="Long" resultType="String"> select distinct m.perms from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role r on r.role_id = ur.role_id + left join sys_user_role sur on rm.role_id = sur.role_id + left join sys_role r on r.role_id = sur.role_id where m.status = '0' and r.status = '0' - and ur.user_id = #{userId} + and sur.user_id = #{userId} </select> </mapper> diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index dc54c7e..90dff50 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -34,8 +34,8 @@ 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 + left join sys_user_role sur on sur.role_id = r.role_id + left join sys_user u on u.user_id = sur.user_id left join sys_dept d on u.dept_id = d.dept_id </sql> @@ -51,14 +51,14 @@ <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> <include refid="selectRoleVo"/> - WHERE r.del_flag = '0' and ur.user_id = #{userId} + WHERE r.del_flag = '0' and sur.user_id = #{userId} </select> <select id="selectRoleListByUserId" parameterType="Long" resultType="Long"> select r.role_id 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 + left join sys_user_role sur on sur.role_id = r.role_id + left join sys_user u on u.user_id = sur.user_id where u.user_id = #{userId} </select> diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 292481c..dacdcd8 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -80,8 +80,8 @@ r.status as role_status from sys_user u left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id + left join sys_user_role sur on u.user_id = sur.user_id + left join sys_role r on r.role_id = sur.role_id </sql> <select id="selectPageUserList" resultMap="SysUserResult"> @@ -104,8 +104,8 @@ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time from sys_user u left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id + left join sys_user_role sur on u.user_id = sur.user_id + left join sys_role r on r.role_id = sur.role_id ${ew.getCustomSqlSegment} </select> @@ -113,8 +113,8 @@ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time from sys_user u left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id + left join sys_user_role sur on u.user_id = sur.user_id + left join sys_role r on r.role_id = sur.role_id ${ew.getCustomSqlSegment} </select> diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml index 63a846d..5a55fcb 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml @@ -10,8 +10,8 @@ </resultMap> <select id="selectUserIdsByRoleId" resultType="Long"> select u.user_id from sys_user u - inner join sys_user_role ur - on u.user_id = ur.user_id and ur.role_id = #{roleId} + inner join sys_user_role sur + on u.user_id = sur.user_id and sur.role_id = #{roleId} </select> </mapper> -- Gitblit v1.9.3