校验租户用户数量
This commit is contained in:
parent
873d809df5
commit
714c371ee2
@ -58,15 +58,14 @@ import java.util.ArrayList;
|
||||
public class SysUserController extends BaseController {
|
||||
@Resource
|
||||
private ISysUserService userService;
|
||||
|
||||
@Resource
|
||||
private ISysRoleService roleService;
|
||||
|
||||
@Resource
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@Resource
|
||||
private ISysPostService postService;
|
||||
@Resource
|
||||
private ISysTenantService tenantService;
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
@ -183,6 +182,9 @@ public class SysUserController extends BaseController {
|
||||
} else if (StringUtils.isNotEmpty(userBo.getEmail()) && !userService.checkEmailUnique(userBo)) {
|
||||
return R.fail("新增用户'" + userBo.getUserName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
if (!tenantService.checkAccountBalance(TenantHelper.getTenantId())) {
|
||||
return R.fail("当前租户下用户名额不足,请您联系管理员增加租户用户数量!");
|
||||
}
|
||||
userBo.setPassword(BCrypt.hashpw(userBo.getPassword()));
|
||||
boolean inserted = userService.insertUser(userBo);
|
||||
if (!inserted) {
|
||||
|
Loading…
Reference in New Issue
Block a user