he2802 před 3 roky
rodič
revize
4bcfba6bc6

+ 6 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -181,9 +181,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
      */
     private void validEntityBeforeSave(Question entity){
         //TODO 做一些数据校验,如唯一约束
-        if(checkNameUnique(entity)&&Validator.isEmpty(entity.getQuestionId())){
+       /* if(checkNameUnique(entity)&&Validator.isEmpty(entity.getQuestionId())){
             throw new CustomException("名称重复");
-        }
+        }*/
     }
 
     @Override
@@ -227,10 +227,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                 errorLog+=question.getType()+"-该题目类型错误\n";
                 continue;
             }
-            if(!Validator.isNotEmpty(question.getPrefixName())){
+           /* if(!Validator.isNotEmpty(question.getPrefixName())){
                 errorLog+=question.getContent()+"-前缀名称空白\n";
                 continue;
-            }
+            }*/
             bo.setContent(question.getContent());
             bo.setType(type);
             bo.setStatus(1);
@@ -285,10 +285,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         if(bo.getOptionsList()!=null){
             add.setJsonStr(JSON.toJSONString(bo.getOptionsList()));
         }
-        if(checkNameUnique(add)){
+        /*if(checkNameUnique(add)){
             errorLog+=bo.getContent()+"-名称重复\n";
            return errorLog;
-        }
+        }*/
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
         boolean result = this.save(add);