From 20eb98994ee1c89eb4ef453037a48d5e357ade5c Mon Sep 17 00:00:00 2001
From: yyy <1083599556@qq.com>
Date: 星期五, 24 四月 2026 21:53:12 +0800
Subject: [PATCH] 1.围栏、点位、场站接口修改和添加 2.发送微信通知 优惠卷、活动、改派/车接单

---
 xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml |   43 +++++++++++++++++++++++++++++++++++++++----
 1 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml b/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
index ee51af0..3434505 100644
--- a/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
+++ b/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
@@ -26,11 +26,13 @@
         <result column="update_by" property="updateBy" />
         <result column="station_id" property="stationId" />
         <result column="station_sort_no" property="stationSortNo" />
+        <result column="point_on_off" property="pointOnOff" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,electronic_area_id, point_name, point_poi, point_number, operation_status, point_type, verification_status, parking_time_limit, operation_type, effective_period, effective_time_period, remarks, point_pictures, point_lon, point_lat, is_deleted, create_time, update_time, create_by, update_by, station_id, station_sort_no
+        id,electronic_area_id, point_name, point_poi, point_number, operation_status, point_type, verification_status, parking_time_limit, operation_type, effective_period,
+        effective_time_period, remarks, point_pictures, point_lon, point_lat, is_deleted, create_time, update_time, create_by, update_by, station_id, station_sort_no,point_on_off
     </sql>
     <select id="pointMap" resultType="com.xiaopeng.api.model.operation.XpPoint">
         select t1.*,
@@ -68,6 +70,18 @@
         </if>
         order by distance  asc
     </select>
+
+    <select id="findListFenceAndStation" resultType="com.xiaopeng.map.vo.FenceAndStationVo">
+        SELECT  1 as type, a.electronic_name as name, GROUP_CONCAT(b.id) ids
+        FROM xp_electronic_fence a
+        INNER JOIN xp_electronic_fence_area b on b.electronic_id = a.id and b.is_deleted = 0
+        WHERE a.is_deleted = 0
+        GROUP BY a.id
+        UNION ALL
+        SELECT 2 as type ,s.station_name as name,s.id as ids FROM xp_station s WHERE s.is_deleted = 0
+
+    </select>
+
     <select id="listAll" resultType="com.xiaopeng.api.model.operation.XpPoint">
         select t1.*
         from xp_point t1
@@ -115,7 +129,8 @@
 
 
     <select id="queryPointByName" resultType="com.xiaopeng.api.vo.order.XpPointsListVo">
-        select p.id,p.electronic_area_id as electronicAreaId,p.point_name as name,p.point_address as address,p.point_lon as longitude,p.point_lat as latitude,p.effective_period,p.effective_time_period
+        select p.id,p.electronic_area_id as electronicAreaId,p.point_name as name,p.point_address as address,
+               p.point_lon as longitude,p.point_lat as latitude,p.effective_period,p.effective_time_period,p.point_on_off,
         from xp_electronic_fence_area xefa
         left join xp_point p on p.electronic_area_id = xefa.id
         where p.is_deleted = 0 and p.operation_status =2 and xefa.is_deleted = 0
@@ -131,12 +146,32 @@
     </select>
     <select id="pageList" resultType="com.xiaopeng.api.model.operation.XpPoint">
         select xp.id,xp.point_number as pointNumber,xp.point_name as pointName,xp.point_poi as pointPoi,
-               xp.point_address as pointAddress,xp.city_code,
+               xp.point_address as pointAddress,xp.city_code,xp.point_on_off,xp.operation_type,xp.effective_time_period,
                xp.point_lon as pointLon,xp.point_lat as pointLat,xp.create_time as createTime,xp.create_by as createBy
         ,xp.parking_time_limit as parkingTimeLimit,xp.verification_status as verificationStatus,xp.operation_status as operationStatus
-        ,xp.station_id as stationId,xp.station_sort_no as stationSortNo
+        ,xp.station_id as stationId,xp.station_sort_no as stationSortNo,xp.remarks,
+        xef.electronic_name as electronicName,xs.station_name  as stationName,xef.effect_time,
+        xef.operation_strategy electronicOperationStrategy
         from xp_point xp
+        left join xp_electronic_fence_area xefa on xefa.id = xp.electronic_area_id
+        left join xp_electronic_fence xef on xef.id = xefa.electronic_id
+        left join xp_station xs on xs.id = xp.station_id
         where xp.is_deleted = 0
+
+        <if test="query.idType != null">
+            <choose>
+                <when test="query.idType == 1">
+                    and xefa.id in (${query.fenceAndStationIds})
+                </when>
+                <when test="query.idType == 2">
+                    and xs.id =#{query.fenceAndStationIds}
+                </when>
+            </choose>
+        </if>
+        <if test="query.cityCode != null and query.cityCode != ''">
+            and xp.city_code =  #{query.cityCode}
+        </if>
+
         <if test="query.pointName != null and query.pointName != ''">
             and xp.point_name like concat('%',#{query.pointName},'%')
         </if>

--
Gitblit v1.7.1