insert into article (a_author_id, a_category_id, a_tags_id, a_md_content, a_publish_date,
a_summary, a_title, a_url)
values (#{authorId}, #{categoryId}, #{tagsId}, #{mdContent}, #{publishDate},
#{summary}, #{title}, #{url})
SELECT LAST_INSERT_ID() AS id
delete
from article
where a_id = #{id}
update article
set
a_title=#{title},a_md_content=#{mdContent},a_summary=#{summary},a_is_original=#{type},a_url=#{url},a_update_date=#{updateDate},a_category_id=#{categoryId},a_tags_id=#{tagsId},next_a_id=#{nextArticleId},pre_a_id=#{preArticleId},a_is_open=#{open}
where a_id = #{id}
update article
set next_a_id=#{nextArticleID}
where a_id = #{targetArticleID}
update article
set pre_a_id=#{preArticleID}
where a_id = #{targetArticleID}
update article
set a_reading_number=#{number}
where a_id = #{id}