insert into source(id, scenic_id, device_id, url, video_url, `type`, face_sample_id, pos_json, create_time)
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id)
values (#{scenicId}, #{faceId}, #{memberId}, #{sourceId}, #{isBuy}, #{type}, #{orderId})
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id)
values
(#{item.scenicId}, #{item.faceId}, #{item.memberId}, #{item.sourceId}, #{item.isBuy}, #{item.type}, #{item.orderId})
update source
scenic_id = #{scenicId},
device_id = #{deviceId},
url = #{url},
video_url = #{videoUrl},
is_buy = #{isBuy},
`type` = #{type},
face_sample_id = #{faceSampleId},
pos_json = #{posJson},
where id = #{id}
update member_source
is_buy = #{isBuy},
order_id = #{orderId},
where member_id = #{memberId} and face_id = #{faceId} and `type` = #{type}
delete from source where id = #{id}