From 1e4bf72ccc19a9a1b58eecc22e078bc5c07e2e6f Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Sun, 28 Dec 2025 14:34:03 +0800
Subject: [PATCH] 1. 优化航线代码业务逻辑。
---
ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml b/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml
index f1c5619..658cfeb 100644
--- a/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml
+++ b/ard-route/src/main/resources/mapper/ArdRouteInfoMapper.xml
@@ -19,6 +19,7 @@
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="pointCount" column="point_count" />
+ <result property="isLoop" column="is_loop" />
</resultMap>
<sql id="selectArdRouteInfoVo">
@@ -35,7 +36,8 @@
create_time,
update_by,
update_time,
- point_count
+ point_count,
+ is_loop
from ard_route_info
</sql>
@@ -48,7 +50,11 @@
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="path != null and path != ''"> and path = #{path}</if>
<if test="groupId != null"> and group_id = #{groupId}</if>
+ <if test="isLoop != null"> and is_loop = #{isLoop}</if>
</where>
+ <if test="orderByTime == null and orderByTime == ''">
+ ORDER BY update_time DESC
+ </if>
<!-- 动态排序 -->
<if test="orderByTime != null and orderByTime != ''">
ORDER BY update_time ${orderByTime}
@@ -77,6 +83,7 @@
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="pointCount != null">point_count,</if>
+ <if test="isLoop != null">is_loop,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -93,6 +100,7 @@
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="pointCount != null">#{pointCount},</if>
+ <if test="isLoop != null">#{isLoop},</if>
</trim>
</insert>
@@ -112,6 +120,7 @@
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="pointCount != null">point_count = #{pointCount},</if>
+ <if test="isLoop != null">is_loop = #{isLoop},</if>
</trim>
where id = #{id}
</update>
@@ -140,7 +149,7 @@
</delete>
<select id="selectArdRouteInfoByGroupId" parameterType="String" resultMap="ArdRouteInfoResult">
- select id,name,path,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time,point_count from ard_route_info
+ select id,name,path,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time,point_count,is_loop from ard_route_info
<where>
<if test="groupId != null "> and group_id = #{groupId}</if>
</where>
--
Gitblit v1.9.3