Browse Source

fix:[模板管理]优化

master
15881625488@163.com 2 months ago
parent
commit
a305a30226
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java

+ 4
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java View File

@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hxhq.business.domain.Step; import com.hxhq.business.domain.Step;
import com.hxhq.business.enums.study.StudyTypeEnum;
import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -49,8 +50,10 @@ public class TemplateServiceImpl extends ServiceImpl i
if(template.getStatus()!=null && template.getStatus().intValue()>0){ if(template.getStatus()!=null && template.getStatus().intValue()>0){
queryWrapper.eq("t.status",template.getStatus()); queryWrapper.eq("t.status",template.getStatus());
} }
if(template.getStudyType()!=null){
if(template.getStudyType()!=null&& template.getStudyType().intValue()>0){
queryWrapper.eq("t.study_type",template.getStudyType()); queryWrapper.eq("t.study_type",template.getStudyType());
}else{
queryWrapper.in("t.study_type", StudyTypeEnum.fsy.getValue(), StudyTypeEnum.sy.getValue());
} }
queryWrapper.orderByAsc("t.sn"); queryWrapper.orderByAsc("t.sn");
return baseMapper.queryList(queryWrapper); return baseMapper.queryList(queryWrapper);

Loading…
Cancel
Save