INSERT INTO m_material_photo(
material_status,
material_photo_id,
material_photo_file_id,
material_id,
material_order,
material_remark,
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) VALUES(
1,
#{materialPhotoId},
#{materialPhotoFileId},
#{materialId},
#{materialOrder},
#{materialRemark},
#{creator},
#{gmtCreate},
#{modifier},
#{gmtModified},
#{isDelete}
)
DELETE FROM
m_material_photo
WHERE
material_id = #{materialId}
UPDATE
m_material_photo
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
material_photo_id IN
#{materialPhotoIds[${index}]}
DELETE FROM
m_material_photo
WHERE
material_photo_id IN
#{materialPhotoIds[${index}]}
UPDATE
m_material_photo
SET
material_status = #{materialStatus}
WHERE
material_photo_id = #{materialPhotoId}
UPDATE
m_material_photo
SET
material_photo_file_id = #{materialPhotoFileId},
material_id = #{materialId},
material_order = #{materialOrder},
material_remark = #{materialRemark},
gmt_modified = #{gmtModified},
modifier = #{modifier},
material_photo_id = material_photo_id
WHERE
material_photo_id = #{materialPhotoId}