| | |
| | | if (role == null) { |
| | | throw new BusinessException("角色不存在"); |
| | | } |
| | | if (!RoleLevelStatus.NORMAL.getCode().equals(role.getLevel())) { |
| | | throw new BusinessException("无法添加超级管理员或用户管理员"); |
| | | if (RoleLevelStatus.SUPER.getCode().equals(role.getLevel())) { |
| | | throw new BusinessException("无法添加超级管理员"); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加管理员日志记录开始 |
| | | * 添加普通用户 日志记录开始 |
| | | */ |
| | | String content = "新注册用户:" + addClientPrarm.getClientName(); |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "添加普通用户", content); |
| | | /** |
| | | * 添加管理员日志记录结束 |
| | | * 添加普通用户 日志记录结束 |
| | | */ |
| | | |
| | | return flag; |
| | |
| | | client.setMobile(updateClientPrarm.getMobile()); |
| | | |
| | | /** |
| | | * 添加管理员日志记录开始 |
| | | * 编辑普通用户 日志记录开始 |
| | | */ |
| | | String content = "编辑普通用户:" + client.getClientName() + "用户id:" + id; |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "编辑普通用户", content); |
| | | /** |
| | | * 添加管理员日志记录结束 |
| | | * 编辑普通用户 日志记录结束 |
| | | */ |
| | | return updateById(client); |
| | | } |
| | |
| | | throw new BusinessException("删除的用户下有下级用户,不允许删除"); |
| | | } |
| | | /** |
| | | * 删除普通用户日志记录开始 |
| | | * 删除普通用户 日志记录开始 |
| | | */ |
| | | String content = "删除普通用户:" + one.getClientName() + "用户id:" + id; |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "删除普通用户", content); |
| | | /** |
| | | * 删除普通用户日志记录结束 |
| | | * 删除普通用户 日志记录结束 |
| | | */ |
| | | |
| | | return removeById(id); |