|
@@ -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);
|