额外更新少字段的relation

This commit is contained in:
2025-07-17 17:45:36 +08:00
parent fd66448f4d
commit 78079b242a
4 changed files with 51 additions and 29 deletions

View File

@@ -6,11 +6,11 @@
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
</insert>
<insert id="addRelation">
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id, is_free)
values (#{scenicId}, #{faceId}, #{memberId}, #{sourceId}, #{isBuy}, #{type}, #{orderId}, #{isFree})
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id<if test="isFree">, is_free</if>)
values (#{scenicId}, #{faceId}, #{memberId}, #{sourceId}, #{isBuy}, #{type}, #{orderId}<if test="isFree">, #{isFree}</if>)
</insert>
<insert id="addRelations">
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id, is_free)
insert member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id, is_free)
values
<foreach collection="list" item="item" separator=",">
(#{item.scenicId}, #{item.faceId}, #{item.memberId}, #{item.sourceId}, #{item.isBuy}, #{item.type}, #{item.orderId}, #{item.isFree})