From 325180b7de27e486b5427d1918078b0e4f5bbab9 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期一, 16 十二月 2024 10:31:54 +0800
Subject: [PATCH] 优化接口 获得全部取水口 重构返回结构,增加片区名称字段、增加县镇村名称字段
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 29 +++++++++++++++++++++++++----
1 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
index b9aba1b..8936453 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -50,12 +50,33 @@
where id = #{id,jdbcType=BIGINT}
</delete>
- <select id="selectAll" resultMap="BaseResultMap">
+ <select id="selectAll" resultType="com.dy.pipIrrGlobal.voPr.VoAllIntake">
<!--@mbg.generated-->
select
- <include refid="Base_Column_List"/>
- from pr_intake
- where deleted != 1
+ ge.id,
+ ge.countyId,
+ ge.townId,
+ ge.villageId,
+ ge.divideId,
+ ge.blockId,
+ ge.`name`,
+ ge.lng,
+ ge.lat,
+ ge.remarks,
+ ge.`operator`,
+ ge.operateDt,
+ blo.`name` AS blockName,
+ CONCAT(country.`name`, town.`name`, village.`name`) AS address
+ FROM pr_intake ge
+ INNER JOIN pr_divide divi ON ge.divideId = divi.id
+ INNER JOIN ba_block blo ON divi.blockId = blo.id
+ LEFT JOIN ba_district country ON ge.countyId = country.id
+ LEFT JOIN ba_district town ON ge.townId = town.id
+ LEFT JOIN ba_district village ON ge.villageId = village.id
+ where
+ ge.deleted = 0
+ AND divi.deleted = 0
+ AND blo.deleted = 0
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
--
Gitblit v1.8.0