From 70b4182fb75db9a5acd234a0ab4c22fd8f93de92 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Tue, 14 Apr 2026 18:07:21 +0800
Subject: [PATCH] fix: 成果下载+成果列表+飞手查询所有

---
 drone-service/drone-gd/src/main/java/org/sxkj/gd/flyer/mapper/GdFlyerMapper.xml |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/flyer/mapper/GdFlyerMapper.xml b/drone-service/drone-gd/src/main/java/org/sxkj/gd/flyer/mapper/GdFlyerMapper.xml
index 2fd3088..89a5f7b 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/flyer/mapper/GdFlyerMapper.xml
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/flyer/mapper/GdFlyerMapper.xml
@@ -37,11 +37,17 @@
         <result column="area_code" property="areaCode"/>
         <result column="flyer_address" property="flyerAddress"/>
         <result column="certification" property="certification" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
+        <result column="area_match_flag" property="areaMatchFlag"/>
     </resultMap>
 
     <select id="selectGdFlyerPage" resultMap="gdFlyerVOResultMap">
         select
-            *
+            *,
+            CASE 
+                WHEN #{param2.areaCode} IS NOT NULL AND #{param2.areaCode} != '' 
+                     AND area_code LIKE concat('%',#{param2.areaCode},'%') THEN 1
+                ELSE 0
+            END as area_match_flag
         from
             ja_gd_flyer
         <where>
@@ -61,10 +67,6 @@
             <if test="param2.skilledTaskType != null and param2.skilledTaskType != ''">
                 and skilled_task_type = #{param2.skilledTaskType}
             </if>
-
-            <if test="param2.areaCode != null and param2.areaCode != ''">
-                and area_code like concat('%',#{param2.areaCode},'%')
-            </if>
             <!-- <if test="param2.deptList != null and param2.deptList.size > 0"> -->
             <!--     AND create_dept in -->
             <!--     <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> -->
@@ -72,6 +74,7 @@
             <!--     </foreach> -->
             <!-- </if> -->
         </where>
+        ORDER BY area_match_flag DESC, create_time DESC
     </select>
 
 

--
Gitblit v1.9.3