From 85681b3f89d2287b948870f79a2eef780480b6a7 Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期二, 08 八月 2023 11:02:53 +0800
Subject: [PATCH] 日子返回格式

---
 ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
index 823c329..2fd4c9e 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
@@ -31,6 +31,12 @@
         <result property="cameraId" column="camera_id"/>
     </resultMap>
 
+    <resultMap type="ArdAlarmpointsWell" id="wellResult">
+        <result property="id" column="id"/>
+        <result property="wellId" column="well_id"/>
+        <result property="type" column="type"/>
+    </resultMap>
+
     <sql id="selectArdAlarmpointsWellVo">
         select c.id,
                c.well_id,
@@ -198,7 +204,7 @@
         WHERE well_id = #{wellId}
     </select>
 
-    <select id="wellByPlanId" parameterType="String" resultMap="ArdAlarmpointsWellResult">
-        select * from ard_alarmpoints_well where id in (select alarmpoints_id from ard_app_patrolpoint where patrolplan_id = #{id})
+    <select id="wellByPlanId" parameterType="String" resultMap="wellResult">
+        select ard_app_patrolpoint.alarmpoints_id as id,ard_alarmpoints_well.well_id, ard_app_patrolpoint."type" from ard_alarmpoints_well LEFT JOIN ard_app_patrolpoint on ard_app_patrolpoint.alarmpoints_id = ard_alarmpoints_well.id where ard_alarmpoints_well.id in (select alarmpoints_id from ard_app_patrolpoint where patrolplan_id = #{id})
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3