From 9fe18033d4491a3ceea6e27c733912a5adb9094b Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 02 Apr 2026 11:18:04 +0800
Subject: [PATCH] opt: sql改造其他模块改造

---
 drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml b/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
index 57e43bd..46c6ddd 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
@@ -99,7 +99,7 @@
             ps.contact_person as police_station_contact_person,
             ps.contact_phone as police_station_contact_phone
         from ja_fw_area_divide ad
-        left join ja_fw_police_station ps on ps.id = ad.police_station_id::VARCHAR and ps.is_deleted = 0
+        left join ja_fw_police_station ps on ps.id::VARCHAR = ad.police_station_id::VARCHAR and ps.is_deleted = 0
         <where>
                 ad.is_deleted = 0
             <if test="deptList != null and deptList.size > 0">
@@ -234,7 +234,7 @@
             ps.contact_person as police_station_contact_person,
             ps.contact_phone as police_station_contact_phone
         from ja_fw_area_divide ad
-        left join ja_fw_police_station ps on ps.id = ad.police_station_id::VARCHAR and ps.is_deleted = 0
+        left join ja_fw_police_station ps on ps.id::VARCHAR = ad.police_station_id::VARCHAR and ps.is_deleted = 0
         where ad.is_deleted = 0
           and ad.id = #{id}
     </select>
@@ -467,7 +467,7 @@
         ps.contact_person as police_station_contact_person,
         ps.contact_phone as police_station_contact_phone
         from ja_fw_area_divide ad
-        left join ja_fw_police_station ps on ps.id = ad.police_station_id::VARCHAR and ps.is_deleted = 0
+        left join ja_fw_police_station ps on ps.id::VARCHAR = ad.police_station_id::VARCHAR and ps.is_deleted = 0
         inner join (
                 SELECT
                     d.id
@@ -565,7 +565,7 @@
         select
         count(1)
         from ja_fw_defense_scene_manage dsm
-        left join ja_fw_defense_scene ds on ds.id = dsm.defense_scene_id::VARCHAR and ds.is_deleted = 0
+        left join ja_fw_defense_scene ds on ds.id::VARCHAR = dsm.defense_scene_id::VARCHAR and ds.is_deleted = 0
         where ds.is_deleted = 0
         and #{areaId} = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[])
         and dsm.is_deleted = 0

--
Gitblit v1.9.3