From bd19bb31512c2ab232e801d10fab9edacedf26ea Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Mon, 09 Mar 2026 13:55:56 +0800
Subject: [PATCH] 2026-03-09 标记功能接口调整: 优化is_true字段,用于标记是否在地图上可见;只要true/false

---
 ard-work/src/main/resources/mapper/ArdMediaPicMapper.xml |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/ArdMediaPicMapper.xml b/ard-work/src/main/resources/mapper/ArdMediaPicMapper.xml
index dc7b7f2..986ade0 100644
--- a/ard-work/src/main/resources/mapper/ArdMediaPicMapper.xml
+++ b/ard-work/src/main/resources/mapper/ArdMediaPicMapper.xml
@@ -59,15 +59,40 @@
                      #{captureTime}, #{createTime},0
                  )
     </insert>
-    <!-- 更新图片 -->
+
+    <!-- 更新图片(按需补全字段) -->
     <update id="updatePic" parameterType="ArdMediaPic">
         UPDATE ard_media_pic
-        SET
-            media_url   = #{mediaUrl},
-            sync_status = #{syncStatus},
+        <set>
+            <if test="mediaUrl != null">
+                media_url = #{mediaUrl},
+            </if>
+            <if test="fileSize != null">
+                file_size = #{fileSize},
+            </if>
+            <if test="fileMd5 != null">
+                file_md5 = #{fileMd5},
+            </if>
+            <if test="captureTime != null">
+                capture_time = #{captureTime},
+            </if>
+            <if test="longitude != null">
+                longitude = #{longitude},
+            </if>
+            <if test="latitude != null">
+                latitude = #{latitude},
+            </if>
+            <if test="height != null">
+                height = #{height},
+            </if>
+            <if test="syncStatus != null">
+                sync_status = #{syncStatus},
+            </if>
             update_time = #{updateTime}
-        WHERE id = #{id} AND media_url IS NULL
+        </set>
+        WHERE id = #{id}
     </update>
+
     <!-- 标记为处理中 -->
     <update id="markProcessing">
         UPDATE ard_media_pic SET sync_status = 1 WHERE id = #{id} AND sync_status = 0

--
Gitblit v1.9.3