Commit f22f8a3c by 吴迪

【修改】添加条件

parent 0867698e
...@@ -10,6 +10,7 @@ import io.office.modules.manage.entity.PlanBranchEntity; ...@@ -10,6 +10,7 @@ import io.office.modules.manage.entity.PlanBranchEntity;
import io.office.modules.manage.service.PlanBranchService; import io.office.modules.manage.service.PlanBranchService;
import io.office.modules.manage.vo.request.PlanBranchVo; import io.office.modules.manage.vo.request.PlanBranchVo;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
...@@ -22,9 +23,9 @@ public class PlanBranchServiceImpl extends ServiceImpl<PlanBranchDao, PlanBranch ...@@ -22,9 +23,9 @@ public class PlanBranchServiceImpl extends ServiceImpl<PlanBranchDao, PlanBranch
@Override @Override
public PageUtils queryPage(Map<String, Object> params) { public PageUtils queryPage(Map<String, Object> params) {
QueryWrapper<PlanBranchEntity> planBranchEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<PlanBranchEntity> planBranchEntityQueryWrapper = new QueryWrapper<>();
planBranchEntityQueryWrapper.eq(params.containsKey("classnum"),"classnum",params.get("classnum")); planBranchEntityQueryWrapper.eq(params.get("classnum")!=null && StringUtils.isNotBlank(params.get("classnum").toString()),"classnum",params.get("classnum"));
planBranchEntityQueryWrapper.eq(params.containsKey("checkflag"),"checkflag",params.get("checkflag")); planBranchEntityQueryWrapper.eq(params.get("checkflag")!=null && StringUtils.isNotBlank(params.get("checkflag").toString()),"checkflag",params.get("checkflag"));
planBranchEntityQueryWrapper.like(params.containsKey("name"),"name",params.get("name")); planBranchEntityQueryWrapper.like(params.get("name")!=null && StringUtils.isNotBlank(params.get("name").toString()),"name",params.get("name"));
planBranchEntityQueryWrapper.orderByAsc("id"); planBranchEntityQueryWrapper.orderByAsc("id");
IPage<PlanBranchEntity> page = this.page( IPage<PlanBranchEntity> page = this.page(
new Query<PlanBranchEntity>().getPage(params), new Query<PlanBranchEntity>().getPage(params),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment