Explorar o código

加入机构名称必填

wangliang %!s(int64=4) %!d(string=hai) anos
pai
achega
d61344d995

+ 3 - 0
themis-admin/src/main/java/com/qmth/themis/admin/api/TBOrgController.java

@@ -76,6 +76,9 @@ public class TBOrgController {
         if (Objects.isNull(tbOrg.getCode()) || Objects.equals(tbOrg.getCode(), "")) {
             throw new BusinessException(ExceptionResultEnum.ORG_CODE_IS_NULL);
         }
+        if (Objects.isNull(tbOrg.getName()) || Objects.equals(tbOrg.getName(), "")) {
+            throw new BusinessException(ExceptionResultEnum.ORG_NAME_IS_NULL);
+        }
         if (Objects.nonNull(tbOrg.getCode()) && Objects.equals(tbOrg.getCode().toUpperCase(), SystemConstant.ADMIN)) {
             throw new BusinessException("admin为超级管理员专属编码,请重新输入");
         }

+ 2 - 0
themis-common/src/main/java/com/qmth/themis/common/enums/ExceptionResultEnum.java

@@ -175,6 +175,8 @@ public enum ExceptionResultEnum {
 
     VERSION_IS_NULL(400, 400051, "版本号不能为空"),
 
+    ORG_NAME_IS_NULL(400, 400052, "机构名称不能为空"),
+
     /**
      * 401
      */