Commit 48e696b079b33955186a68f6c47363f2c379b8b5
Merge remote-tracking branch 'origin/dev' into dev
Showing
3 changed files
with
21 additions
and
2 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadPageReqVO.java
| 1 | 1 | package com.zteits.urbanops.module.garden.controller.admin.road.vo; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.DepartmentCostDO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 3 | 6 | import lombok.*; |
| 4 | 7 | import java.util.*; |
| 5 | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| ... | ... | @@ -83,4 +86,12 @@ public class RoadPageReqVO extends PageParam { |
| 83 | 86 | @Schema(description = "更新者", example = "芋艿") |
| 84 | 87 | private String updaterName; |
| 85 | 88 | |
| 89 | + //对应前端排序字段 | |
| 90 | + public static final Map<String, SFunction<RoadDO, ?>> SORT_FIELD_MAP = Map.of( | |
| 91 | + "id", RoadDO::getId, | |
| 92 | + "greenBeltTreeArea", RoadDO::getGreenBeltTreeArea, | |
| 93 | + "greenBeltArea", RoadDO::getGreenBeltArea, | |
| 94 | + "totalArea", RoadDO::getTotalArea, | |
| 95 | + "treeArea", RoadDO::getTreeArea | |
| 96 | + ); | |
| 86 | 97 | } |
| 87 | 98 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/road/RoadInterceptMapper.java
| ... | ... | @@ -4,6 +4,7 @@ import com.zteits.urbanops.framework.annotation.ProcessBusinessLine; |
| 4 | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | 5 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; |
| 6 | 6 | import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.departmentcost.vo.DepartmentCostPageReqVO; | |
| 7 | 8 | import com.zteits.urbanops.module.garden.controller.admin.road.vo.RoadPageReqVO; |
| 8 | 9 | import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; |
| 9 | 10 | import org.apache.ibatis.annotations.Mapper; |
| ... | ... | @@ -42,7 +43,10 @@ public interface RoadInterceptMapper extends BaseMapperX<RoadDO> { |
| 42 | 43 | .likeIfPresent(RoadDO::getCreatorName, reqVO.getCreatorName()) |
| 43 | 44 | .betweenIfPresent(RoadDO::getCreateTime, reqVO.getCreateTime()) |
| 44 | 45 | .likeIfPresent(RoadDO::getUpdaterName, reqVO.getUpdaterName()) |
| 45 | - .orderByDesc(RoadDO::getId)); | |
| 46 | + .orderBy(true, reqVO.getSortAsc(), | |
| 47 | + RoadPageReqVO.SORT_FIELD_MAP.get(reqVO.getOrderByColumn()) | |
| 48 | + ) | |
| 49 | + ); | |
| 46 | 50 | } |
| 47 | 51 | |
| 48 | 52 | } |
| 49 | 53 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
| ... | ... | @@ -38,6 +38,9 @@ |
| 38 | 38 | a.batch_no = b.batch_no |
| 39 | 39 | AND a.plan_no = c.plan_no |
| 40 | 40 | AND b.batch_no = c.batch_no |
| 41 | + AND a.deleted = c.deleted | |
| 42 | + AND a.deleted = b.deleted | |
| 43 | + AND a.deleted = 0 | |
| 41 | 44 | <if test="req.planNo != null and req.planNo !=''"> |
| 42 | 45 | and a.plan_no LIKE CONCAT('%', #{req.planNo},'%') |
| 43 | 46 | </if> |
| ... | ... | @@ -45,7 +48,7 @@ |
| 45 | 48 | and b.plan_name LIKE CONCAT('%', #{req.planName},'%') |
| 46 | 49 | </if> |
| 47 | 50 | <if test="req.roadName != null and req.roadName !=''"> |
| 48 | - AND b.road_name LIKE CONCAT(#{req.roadName},'%') | |
| 51 | + AND b.road_name LIKE CONCAT('%', #{req.roadName},'%') | |
| 49 | 52 | </if> |
| 50 | 53 | <if test="req.levelId != null"> |
| 51 | 54 | and b.level_id = #{req.levelId} |
| ... | ... | @@ -83,6 +86,7 @@ |
| 83 | 86 | <if test="req.createTimeEnd != null"> |
| 84 | 87 | <![CDATA[AND DATE_FORMAT(a.create_time, '%Y-%m-%d') <= #{req.createTimeEnd}]]> |
| 85 | 88 | </if> |
| 89 | + order by c.id desc | |
| 86 | 90 | </select> |
| 87 | 91 | |
| 88 | 92 | <select id="appMaintainPlanCommitDetailPage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO"> | ... | ... |