Browse Source

fix 试卷编辑

he2802 2 years ago
parent
commit
8c31434b35

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java

@@ -164,6 +164,9 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean updateByEditBo(ExamEditBo bo) {
+        if(Validator.isEmpty(bo.getExamId())){
+            throw new CustomException("试卷ID缺失");
+        }
         Exam update = BeanUtil.toBean(bo, Exam.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());