| | |
| | | #{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 |