From 94b1b03c835d10fb4821976cde30180df228bdd4 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 26 四月 2024 13:41:47 +0800
Subject: [PATCH] 修改 分水房查询接口 增加修改查询的数据内容

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrDivideMapper.xml |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrDivideMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrDivideMapper.xml
index 0d89673..91c62a2 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrDivideMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrDivideMapper.xml
@@ -249,8 +249,8 @@
         AND divi.name LIKE CONCAT('%',#{divideName},'%')
       </if>
 
-      <if test = "blockName != null and blockName !=''">
-        AND blo.name = #{blockName}
+      <if test = "blockId != null and blockId !=''">
+        AND divi.blockId = #{blockId}
       </if>
     </where>
   </select>
@@ -261,10 +261,17 @@
       (@i:=@i+1) AS id,
       CAST(divi.id AS char) AS divideId,
       divi.name AS divideName,
+      CAST(divi.blockId AS char) AS blockId,
       blo.`name` AS blockName,
       divi.header,
+      divi.villages,
+      divi.area,
+      divi.lng,
+      divi.lat,
       divi.phone,
+      divi.remarks,
       CONCAT(country.`name`, town.`name`, village.`name`) AS address,
+      CAST(divi.operator AS char) AS operator,
       divi.operateDt
     FROM pr_divide divi
         INNER JOIN ba_block blo ON divi.blockId = blo.id
@@ -278,14 +285,16 @@
         AND divi.name LIKE CONCAT('%',#{divideName},'%')
       </if>
 
-      <if test = "blockName != null and blockName !=''">
-        AND blo.name = #{blockName}
+      <if test = "blockId != null">
+        AND divi.blockId = #{blockId}
       </if>
     </where>
     ORDER BY divi.operateDt DESC
-    <if test="pageCurr != null and pageSize != null">
-      LIMIT ${pageCurr}, ${pageSize}
-    </if>
+    <trim prefix="limit " >
+      <if test="start != null and count != null">
+        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+      </if>
+    </trim>
   </select>
 
   <!--鏍规嵁鍒嗘按鎴縄D閫昏緫鍒犻櫎鍒嗘按鎴�-->
@@ -300,7 +309,7 @@
 
   <!--鏍规嵁鍒嗘按鎴跨紪鍙疯幏鍙栨墍灞炵墖鍖虹紪鍙�-->
   <select id="getBlockIdById" resultType="java.lang.Long">
-    SELECT blockId FROM pr_divide WHERE id = ${divideId}}
+    SELECT blockId FROM pr_divide WHERE id = ${divideId}
   </select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0