Commit a7a0a5908ba0a369bb862fc5fdd813d739abd23f

Authored by 王富生
1 parent 70d74a2c

分页拦名字优化

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/inspectionplan/InspectionPlanInterceptMapper.java
... ... @@ -17,7 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
17 17 @ProcessBusinessLine
18 18 @Mapper
19 19 public interface InspectionPlanInterceptMapper extends BaseMapperX<InspectionPlanDO> {
20   - default PageResult<InspectionPlanDO> selectPage(InspectionPlanPageReqVO reqVO) {
  20 + default PageResult<InspectionPlanDO> selectForPage(InspectionPlanPageReqVO reqVO) {
21 21 return selectPage(reqVO, new LambdaQueryWrapperX<InspectionPlanDO>()
22 22 .eqIfPresent(InspectionPlanDO::getBatchNo, reqVO.getBatchNo())
23 23 .likeIfPresent(InspectionPlanDO::getPlanName, reqVO.getPlanName())
... ... @@ -29,7 +29,6 @@ public interface InspectionPlanInterceptMapper extends BaseMapperX&lt;InspectionPla
29 29 .eqIfPresent(InspectionPlanDO::getFinishState, reqVO.getFinishState())
30 30 .eqIfPresent(InspectionPlanDO::getFinishState, reqVO.getFinishState())
31 31 .betweenIfPresent(InspectionPlanDO::getBeginTime, reqVO.getBeginTime())
32   - .eq(InspectionPlanDO::getDeleted,0)
33 32 .betweenIfPresent(InspectionPlanDO::getEndTime, reqVO.getEndTime())
34 33 .orderByDesc(InspectionPlanDO::getId));
35 34 }
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanInterceptMapper.java
... ... @@ -18,7 +18,7 @@ import org.apache.ibatis.annotations.Mapper;
18 18 @Mapper
19 19 public interface MaintainPlanInterceptMapper extends BaseMapperX<MaintainPlanDO> {
20 20  
21   - default PageResult<MaintainPlanDO> selectPage(MaintainPlanPageReqVO reqVO) {
  21 + default PageResult<MaintainPlanDO> selectForPage(MaintainPlanPageReqVO reqVO) {
22 22 return selectPage(reqVO, new LambdaQueryWrapperX<MaintainPlanDO>()
23 23 .eqIfPresent(MaintainPlanDO::getBatchNo, reqVO.getBatchNo())
24 24 .likeIfPresent(MaintainPlanDO::getPlanName, reqVO.getPlanName())
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/planrate/PlanRateInterceptMapper.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.dal.mysql.planrate;
  2 +
  3 +import com.zteits.urbanops.framework.annotation.ProcessBusinessLine;
  4 +import com.zteits.urbanops.framework.common.pojo.PageResult;
  5 +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX;
  6 +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX;
  7 +import com.zteits.urbanops.module.garden.controller.admin.planrate.vo.PlanRatePageReqVO;
  8 +import com.zteits.urbanops.module.garden.dal.dataobject.planrate.PlanRateDO;
  9 +import org.apache.ibatis.annotations.Mapper;
  10 +
  11 +/**
  12 + * 计划频次 Mapper
  13 + *
  14 + * @author 超级管理员
  15 + */
  16 +@ProcessBusinessLine
  17 +@Mapper
  18 +public interface PlanRateInterceptMapper extends BaseMapperX<PlanRateDO> {
  19 +
  20 + default PageResult<PlanRateDO> selectForPage(PlanRatePageReqVO reqVO) {
  21 + return selectPage(reqVO, new LambdaQueryWrapperX<PlanRateDO>()
  22 + .eqIfPresent(PlanRateDO::getRateNo, reqVO.getRateNo())
  23 + .eqIfPresent(PlanRateDO::getBusiLine, reqVO.getBusiLine())
  24 + .eqIfPresent(PlanRateDO::getPlanTypeId, reqVO.getPlanTypeId())
  25 + .eqIfPresent(PlanRateDO::getStdPlan, reqVO.getStdPlan())
  26 + .eq(PlanRateDO::getType, reqVO.getType())
  27 + .orderByDesc(PlanRateDO::getId));
  28 + }
  29 +}
0 30 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/road/RoadInterceptMapper.java
... ... @@ -17,7 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
17 17 @Mapper
18 18 public interface RoadInterceptMapper extends BaseMapperX<RoadDO> {
19 19  
20   - default PageResult<RoadDO> selectPage(RoadPageReqVO reqVO) {
  20 + default PageResult<RoadDO> selectForPage(RoadPageReqVO reqVO) {
21 21 return selectPage(reqVO, new LambdaQueryWrapperX<RoadDO>()
22 22 .likeIfPresent(RoadDO::getRoadName, reqVO.getRoadName())
23 23 .eqIfPresent(RoadDO::getStreetId, reqVO.getStreetId())
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanServiceImpl.java
... ... @@ -246,7 +246,7 @@ public class InspectionPlanServiceImpl implements InspectionPlanService {
246 246  
247 247 @Override
248 248 public PageResult<InspectionPlanRespVO> getInspectionPlanPage(InspectionPlanPageReqVO pageReqVO) {
249   - PageResult<InspectionPlanDO> pageResult = inspectionPlanInterceptMapper.selectPage(pageReqVO);
  249 + PageResult<InspectionPlanDO> pageResult = inspectionPlanInterceptMapper.selectForPage(pageReqVO);
250 250  
251 251 PageResult<InspectionPlanRespVO> result = BeanUtils.toBean(pageResult, InspectionPlanRespVO.class);
252 252 addDataInspectionPlan(result.getList());
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanServiceImpl.java
... ... @@ -246,7 +246,7 @@ public class MaintainPlanServiceImpl implements MaintainPlanService {
246 246  
247 247 @Override
248 248 public PageResult<MaintainPlanRespVO> getMaintainPlanPage(MaintainPlanPageReqVO pageReqVO) {
249   - PageResult<MaintainPlanDO> pageResult = maintainPlanInterceptMapper.selectPage(pageReqVO);
  249 + PageResult<MaintainPlanDO> pageResult = maintainPlanInterceptMapper.selectForPage(pageReqVO);
250 250 PageResult<MaintainPlanRespVO> result = BeanUtils.toBean(pageResult, MaintainPlanRespVO.class);
251 251 addDataInspectionPlan(result.getList());
252 252 return result;
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/planrate/PlanRateServiceImpl.java
... ... @@ -11,6 +11,7 @@ import com.zteits.urbanops.framework.common.util.object.BeanUtils;
11 11 import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils;
12 12 import com.zteits.urbanops.module.garden.dal.dataobject.planrate.PlanRateDetailDO;
13 13 import com.zteits.urbanops.module.garden.dal.mysql.planrate.PlanRateDetailMapper;
  14 +import com.zteits.urbanops.module.garden.dal.mysql.planrate.PlanRateInterceptMapper;
14 15 import org.springframework.stereotype.Service;
15 16 import jakarta.annotation.Resource;
16 17 import org.springframework.validation.annotation.Validated;
... ... @@ -42,6 +43,9 @@ public class PlanRateServiceImpl implements PlanRateService {
42 43 private PlanRateMapper planRateMapper;
43 44  
44 45 @Resource
  46 + private PlanRateInterceptMapper planRateInterceptMapper;
  47 +
  48 + @Resource
45 49 private PlanRateDetailMapper planRateDetailMapper;
46 50  
47 51 @Resource
... ... @@ -178,7 +182,7 @@ public class PlanRateServiceImpl implements PlanRateService {
178 182  
179 183 @Override
180 184 public PageResult<PlanRateDO> getPlanRatePage(PlanRatePageReqVO pageReqVO) {
181   - return planRateMapper.selectPage(pageReqVO);
  185 + return planRateInterceptMapper.selectForPage(pageReqVO);
182 186 }
183 187  
184 188 @Override
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadServiceImpl.java
... ... @@ -114,7 +114,7 @@ public class RoadServiceImpl implements RoadService {
114 114  
115 115 @Override
116 116 public PageResult<RoadRespVO> getRoadPage(RoadPageReqVO pageReqVO) {
117   - PageResult<RoadDO> pageResult = roadInterceptMapper.selectPage(pageReqVO);
  117 + PageResult<RoadDO> pageResult = roadInterceptMapper.selectForPage(pageReqVO);
118 118 PageResult<RoadRespVO> page = BeanUtils.toBean(pageResult, RoadRespVO.class);
119 119 addDataInspectionPlan(page.getList());
120 120 return page;
... ...