From 7a8fe33d905a74e9cd092d9e9cc3d446c79b9c7e Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Tue, 03 Mar 2026 08:58:19 +0800
Subject: [PATCH] 1. 修改分组无添加父级目录问题。
---
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