|
@@ -332,18 +332,8 @@ public class UserController extends BaseController {
|
|
|
@ResponseBody
|
|
|
public Object addUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{
|
|
|
JSONObject result = ExceptionConstants.standardSuccess();
|
|
|
- User userInfo = userService.getCurrentUser();
|
|
|
- Tenant tenant = tenantService.getTenantByTenantId(userInfo.getTenantId());
|
|
|
- Long count = userService.countUser(null,null);
|
|
|
- if(tenant!=null) {
|
|
|
- if(count>= tenant.getUserNumLimit()) {
|
|
|
- throw new BusinessParamCheckingException(ExceptionConstants.USER_OVER_LIMIT_FAILED_CODE,
|
|
|
- ExceptionConstants.USER_OVER_LIMIT_FAILED_MSG);
|
|
|
- } else {
|
|
|
- UserEx ue= JSONObject.parseObject(obj.toJSONString(), UserEx.class);
|
|
|
- userService.addUserAndOrgUserRel(ue, request);
|
|
|
- }
|
|
|
- }
|
|
|
+ UserEx ue= JSONObject.parseObject(obj.toJSONString(), UserEx.class);
|
|
|
+ userService.addUserAndOrgUserRel(ue, request);
|
|
|
return result;
|
|
|
}
|
|
|
|