Browse Source

3.0.0-bug修改

xiaof 3 years ago
parent
commit
d56547f679

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicTemplateServiceImpl.java

@@ -148,10 +148,10 @@ public class BasicTemplateServiceImpl extends ServiceImpl<BasicTemplateMapper, B
     @Override
     public boolean enable(BasicTemplate template) {
         // 校验模板是否已有绑定命题任务
-        boolean used = examCardService.usedCardByTemplateId(template.getId());
-        if (used && !template.getEnable()) {
-            throw ExceptionResultEnum.ERROR.exception("通用题卡模板已绑定任务,不能禁用");
-        }
+//        boolean used = examCardService.usedCardByTemplateId(template.getId());
+//        if (used && !template.getEnable()) {
+//            throw ExceptionResultEnum.ERROR.exception("通用题卡模板已绑定任务,不能禁用");
+//        }
         UpdateWrapper<BasicTemplate> updateWrapper = new UpdateWrapper<>();
         updateWrapper.lambda().set(BasicTemplate::getEnable, template.getEnable()).eq(BasicTemplate::getId, template.getId());
         return this.update(updateWrapper);