소스 검색

添加用户修改

huang 17 시간 전
부모
커밋
4426fe056d
1개의 변경된 파일2개의 추가작업 그리고 12개의 파일을 삭제
  1. 2 12
      src/main/java/com/jsh/erp/controller/UserController.java

+ 2 - 12
src/main/java/com/jsh/erp/controller/UserController.java

@@ -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;
     }