insert into t_comments_poem (comments_id,poem_id,user_id,comments_information,`time`) values (#{commentsId},#{poemId},#{userId},#{commentsInformation},#{time}); insert into t_comments_dynasty (comments_id,dynasty_id,user_id,comments_information,`time`) values (#{commentsId},#{dynastyId},#{userId},#{commentsInformation},#{time}); insert into t_reply_poem (comments_id,replyer_id) values (#{replyerId},#{commentsId}); insert into t_reply_dynasty (comments_id,replyer_id) values (#{replyerId},#{commentsId}); delete from t_comments_poem where comments_id=#{commentsId} ; delete from t_comments_dynasty where comments_id=#{commentsId}; delete from t_reply_dynasty where comments_id=#{commentsId} or replyer_id=#{commentsId}; delete from t_reply_poem where comments_id=#{commentsId} or replyer_id=#{commentsId}; delete from t_reply_poem where comments_id in ( select comments_id from t_comments_poem where poem_id=#{poemId} ) delete from t_reply_dynasty where comments_id in ( select comments_id from t_comments_dynasty where dynasty_id=#{dynastyId} ) delete from t_comments_poem where poem_id=#{poemId} delete from t_comments_dynasty where dynasty_id=#{dynastyId}