修复bug: 角色删除报错,和删除部门、删除岗位问题

This commit is contained in:
FZR 2023-05-12 10:31:52 +08:00
parent 312c6e7d5e
commit 4a0cbc2c5b
3 changed files with 3 additions and 3 deletions

View File

@ -214,7 +214,7 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService {
SystemAuthAdmin systemAuthAdmin = systemAuthAdminMapper.selectOne(new QueryWrapper<SystemAuthAdmin>()
.select("id,nickname")
.eq("dept_id", id)
.apply("find_in_set({0}, dept_ids)", id)
.eq("is_delete", 0)
.last("limit 1"));

View File

@ -214,7 +214,7 @@ public class SystemAuthPostServiceImpl implements ISystemAuthPostService {
SystemAuthAdmin systemAuthAdmin = systemAuthAdminMapper.selectOne(new QueryWrapper<SystemAuthAdmin>()
.select("id,nickname")
.eq("post_id", id)
.apply("find_in_set({0}, post_ids)", id)
.eq("is_delete", 0)
.last("limit 1"));

View File

@ -210,7 +210,7 @@ public class SystemAuthRoleServiceImpl implements ISystemAuthRoleService {
Assert.isNull(systemAuthAdminMapper.selectOne(new QueryWrapper<SystemAuthAdmin>()
.select("id", "role", "nickname")
.eq("role", id)
.apply("find_in_set({0}, role_ids)", id)
.eq("is_delete", 0)),
"角色已被管理员使用,请先移除");