INSERT INTO m_material_text(
material_text_id,
material_text_content,
material_text_title,
material_id,
material_order,
material_remark,
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) VALUES(
#{materialTextId},
#{materialTextContent},
#{materialTextTitle},
#{materialId},
#{materialOrder},
#{materialRemark},
#{creator},
#{gmtCreate},
#{modifier},
#{gmtModified},
#{isDelete}
)
DELETE FROM
m_material_text
WHERE
material_id = #{materialId}
UPDATE
m_material_text
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
material_text_id IN
#{materialTextIds[${index}]}
DELETE FROM
m_material_text
WHERE
material_text_id IN
#{materialTextIds[${index}]}
UPDATE
m_material_text
SET
material_text_content = #{materialTextContent},
material_text_title = #{materialTextTitle},
material_id = #{materialId},
material_order = #{materialOrder},
material_remark = #{materialRemark},
gmt_modified = #{gmtModified},
modifier = #{modifier},
material_text_id = material_text_id
WHERE
material_text_id = #{materialTextId}