添加用户系统繁忙

master
anthonywj 2 years ago
parent f90eb22ee3
commit acc8533a34

@ -153,10 +153,10 @@ public class SysUserController extends BaseController {
AuthAdmin curUser = getUser();
//先获取账号最大用户量
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(curUser.getCustomerId());
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(curUser.getCustomerId());
//获取此账号下存在的用户量
List<AuthAdmin> byCustomerld = authAdminService.findByCustomerld(curUser.getCustomerId());
if(customerInfoEntity.getUserMax() <=byCustomerld.size()){
if (customerInfoEntity != null && customerInfoEntity.getUserMax() <= byCustomerld.size()) {
return ResultVOUtils.error(500, "已到达最大用户量");
}
@ -179,7 +179,7 @@ public class SysUserController extends BaseController {
}
// 插入角色
if (authUserSaveRequest.getRoles().size()!=0) {
if (authUserSaveRequest.getRoles().size() != 0) {
userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles());
}
//先获取角色id
@ -190,8 +190,6 @@ public class SysUserController extends BaseController {
userService.insertUserAuth1(sysUserRole);
//插入部门
if (CollUtil.isNotEmpty(authUserSaveRequest.getDepts())) {
List<DeptUserEntity> list = new ArrayList<>();
@ -247,12 +245,11 @@ public class SysUserController extends BaseController {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
// 修改角色
// userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles());
// userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles());
userService.updateAuthAdmin(authAdmin);
//修改所属部门
deptUserService.deleteByUser(authUserSaveRequest.getId());
if (CollUtil.isNotEmpty(authUserSaveRequest.getDepts())) {

Loading…
Cancel
Save