INSERT INTO card_template_person( card_person_id, background_id, card_name, template_id, content, source, creator, gmt_create, modifier, gmt_modified, is_delete ) VALUES( #{cardPersonId}, #{backgroundId}, #{cardName}, #{templateId}, #{content}, #{source}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, #{isDelete} ) UPDATE card_template_person SET gmt_modified = #{gmtModified}, modifier = #{modifier}, is_delete = 1 WHERE card_person_id = #{cardPersonId} DELETE FROM card_template_person WHERE card_person_id = #{cardPersonId} UPDATE card_template_person SET card_person_id = #{cardPersonId}, background_id = #{backgroundId}, card_name = #{cardName}, template_id = #{templateId}, content = #{content}, source = #{source}, creator = #{creator}, gmt_create = #{gmtCreate}, modifier = #{modifier}, is_delete = #{isDelete}, gmt_modified = #{gmtModified} WHERE card_person_id = #{cardPersonId}