jiaosong
2023-10-24 f69c776b9532ae6563a5d5e122fba9b840c3a0d9
# 用户禁用
已修改1个文件
3 ■■■■■ 文件已修改
server/services/src/main/java/com/doumee/biz/system/impl/SystemUserBizImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemUserBizImpl.java
@@ -58,6 +58,9 @@
        if (Constants.formatIntegerNum(user.getFixed())==Constants.ONE ) {
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "请勿删除" + user.getUsername() + ",因为这是固定用户");
        }
        if ("admin".equals(user.getUsername())){
            throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "超级管理员账号不允许删除");
        }
        systemUserService.deleteById(id);
    }