|
@@ -13,6 +13,7 @@ import com.qmth.distributed.print.business.enums.TemplateTypeEnum;
|
|
import com.qmth.distributed.print.business.mapper.BasicCardRuleMapper;
|
|
import com.qmth.distributed.print.business.mapper.BasicCardRuleMapper;
|
|
import com.qmth.distributed.print.business.service.BasicCardRuleService;
|
|
import com.qmth.distributed.print.business.service.BasicCardRuleService;
|
|
import com.qmth.distributed.print.business.service.BasicTemplateOrgService;
|
|
import com.qmth.distributed.print.business.service.BasicTemplateOrgService;
|
|
|
|
+import com.qmth.distributed.print.business.service.ExamTaskService;
|
|
import com.qmth.distributed.print.business.util.ServletUtil;
|
|
import com.qmth.distributed.print.business.util.ServletUtil;
|
|
import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
import com.qmth.distributed.print.common.enums.ExceptionResultEnum;
|
|
import com.qmth.distributed.print.common.enums.ExceptionResultEnum;
|
|
@@ -38,7 +39,6 @@ public class BasicCardRuleServiceImpl extends ServiceImpl<BasicCardRuleMapper, B
|
|
@Autowired
|
|
@Autowired
|
|
private BasicTemplateOrgService basicTemplateOrgService;
|
|
private BasicTemplateOrgService basicTemplateOrgService;
|
|
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public IPage<CardRuleDto> list(Boolean enable, String name, Long createTime, Integer pageNumber, Integer pageSize) {
|
|
public IPage<CardRuleDto> list(Boolean enable, String name, Long createTime, Integer pageNumber, Integer pageSize) {
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
@@ -58,8 +58,8 @@ public class BasicCardRuleServiceImpl extends ServiceImpl<BasicCardRuleMapper, B
|
|
public List<BasicCardRule> list(String param) {
|
|
public List<BasicCardRule> list(String param) {
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
QueryWrapper<BasicCardRule> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BasicCardRule> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.lambda().eq(BasicCardRule::getSchoolId, schoolId);
|
|
|
|
- if(StringUtils.isNotBlank(param)){
|
|
|
|
|
|
+ queryWrapper.lambda().eq(BasicCardRule::getSchoolId, schoolId).eq(BasicCardRule::getEnable, true);
|
|
|
|
+ if (StringUtils.isNotBlank(param)) {
|
|
queryWrapper.lambda().like(BasicCardRule::getName, param);
|
|
queryWrapper.lambda().like(BasicCardRule::getName, param);
|
|
}
|
|
}
|
|
return this.list(queryWrapper);
|
|
return this.list(queryWrapper);
|
|
@@ -67,7 +67,6 @@ public class BasicCardRuleServiceImpl extends ServiceImpl<BasicCardRuleMapper, B
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean enable(BasicCardRule cardRule) {
|
|
public boolean enable(BasicCardRule cardRule) {
|
|
- // todo 校验规则是否有使用
|
|
|
|
UpdateWrapper<BasicCardRule> updateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<BasicCardRule> updateWrapper = new UpdateWrapper<>();
|
|
updateWrapper.lambda().set(BasicCardRule::getEnable, cardRule.getEnable()).eq(BasicCardRule::getId, cardRule.getId());
|
|
updateWrapper.lambda().set(BasicCardRule::getEnable, cardRule.getEnable()).eq(BasicCardRule::getId, cardRule.getId());
|
|
return this.update(updateWrapper);
|
|
return this.update(updateWrapper);
|