From 7cbb0422ec68c5b2254a4dab449218ea2ca32c76 Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期六, 19 八月 2023 11:14:48 +0800
Subject: [PATCH] 打卡
---
ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 11 +++++++++--
1 files changed, 9 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..8d14d35 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,8 @@
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",ard_alarmpoints_well.longitude,ard_alarmpoints_well.latitude 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})
+ GROUP BY ard_app_patrolpoint.alarmpoints_id,ard_alarmpoints_well.well_id,ard_app_patrolpoint."type",ard_alarmpoints_well.longitude,ard_alarmpoints_well.latitude
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3