INSERT INTO tb_attr_content(id, attr_code, detail_id , attr_content, refer_id, state, attr_type, sort_no)
VALUES
(#{content.id}, #{content.attrCode}, #{content.detailId} , #{content.attrContent}, #{content.referId}, #{content.state}, #{content.attrType}, #{content.sortNo})
UPDATE tb_attr_content SET state = '0'
WHERE refer_id = (
SELECT displace_id
FROM tb_displace_audit
WHERE id = #{displaceId}
)