| | |
| | | public boolean addClient(AddClientPrarm addClientPrarm) { |
| | | |
| | | if (getOne(Wrappers.lambdaQuery(Client.class).eq(Client::getClientName, addClientPrarm.getClientName().trim())) != null) { |
| | | throw new BusinessException("该用户名已存在!"); |
| | | throw new BusinessException("该用户名已在客户中存在!"); |
| | | } |
| | | Admin admin = SpringContextHolder.getBean(AdminService.class).findByUserName(addClientPrarm.getClientName()); |
| | | if (admin != null) { |
| | | throw new BusinessException("当前账号" + addClientPrarm.getClientName() + "已经在管理员中存在"); |
| | | } |
| | | Long userId = SecurityUtils.getUserId(); |
| | | boolean clientId = findClientId(); |