🐎 优化管理员不允许删除的提示信息

This commit is contained in:
b2baccline
2020-11-03 20:21:02 +08:00
parent aeb051c43d
commit 7497c0cc44

View File

@@ -194,10 +194,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
*/
@Override
public boolean deleteByUserId(Integer userId) {
if (adminUserChecker.isAdminUser(getById(userId))) {
return false;
}
// TODO 缓存控制
Assert.isFalse(adminUserChecker.isAdminUser(getById(userId)), "管理员不允许删除!");
return SqlHelper.retBool(baseMapper.deleteById(userId));
}