Explorar el Código

修改类型错误的提示

guo00guo hace 5 años
padre
commit
266fc2e8a7

+ 2 - 2
core/src/main/java/com/mooctest/crowd/domain/repository/CommonRepo.java

@@ -236,7 +236,7 @@ public class CommonRepo {
         // 测试类型的转换
         Optional<TestTypePO> testTypePO = testTypeDao.findByCode(code);
         if (!testTypePO.isPresent()) {
-            throw new HttpBadRequestException("请选择测试类型");
+            throw new HttpBadRequestException("测试类型有误");
         }
         return testTypePO.get().getName();
     }
@@ -244,7 +244,7 @@ public class CommonRepo {
     public String getApplicationNameByCode(String code) {
         Optional<ApplicationTypePO> applicationTypePO = applicationTypeDao.findByCode(code);
         if (!applicationTypePO.isPresent()) {
-            throw new HttpBadRequestException("请选择应用类型");
+            throw new HttpBadRequestException("应用类型有误");
         }
         return applicationTypePO.get().getName();
     }

+ 3 - 3
site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java

@@ -779,7 +779,7 @@ public class WebMediatorImpl implements ViewMediator {
         if (fieldPO.isPresent()) {
             projectVO.setField(fieldPO.get().getName());
         } else {
-            throw new HttpBadRequestException("请选择领域类型");
+            throw new HttpBadRequestException("领域类型有误");
         }
 
         // 测试类型的转换
@@ -1107,7 +1107,7 @@ public class WebMediatorImpl implements ViewMediator {
             if (applicationTypePO.isPresent()) {
                 crowdTestProject.setApplicationType(applicationTypePO.get().getName());
             } else {
-                throw new HttpBadRequestException("请选择应用类型");
+                throw new HttpBadRequestException("应用类型有误");
             }
             return new CrowdTestProjectVO(crowdTestProject);
 
@@ -1127,7 +1127,7 @@ public class WebMediatorImpl implements ViewMediator {
             if (applicationTypePO.isPresent()) {
                 crowdTestProject.setApplicationType(applicationTypePO.get().getName());
             } else {
-                throw new HttpBadRequestException("请选择应用类型");
+                throw new HttpBadRequestException("应用类型有误");
             }
             return new CrowdTestProjectVO(crowdTestProject);