delete from forum where id = #{id}
update forum set flag = #{flag} ,
title = #{title}, content = #{content}, tag_ids = #{tagIds},
avatars = #{avatars} , description = #{description} ,
commentabled = #{commentabled} ,update_time = #{updateTime} where id = #{id};
update forum b set b.views=b.views+1 where id=#{id};
insert into forum (title, content, avatars, flag,
views, commentabled, create_time, update_time, tag_ids, user_id, description)
values (#{title}, #{content}, #{avatars}, #{flag}, #{views}, #{commentabled}, #{createTime},
#{updateTime}, #{tagIds}, #{userId}, #{description});
insert into forum_tags (tag_id, forum_id) values (#{tagId},#{forumId});
update forum b set b.like=b.like+1 where b.id=#{id}
update forum b set b.like=b.like-1 where b.id=#{forumId}