CommentContentMapper.xml 824 B

123456789101112131415161718
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="org.dromara.mapper.CommentContentMapper">
  6. <update id="deleteCommentContentByCommentId" parameterType="org.dromara.domain.communityNews.CommentContent">
  7. update comment_content set del_flag = '1' where comment_id in(select comment_id from comment_index where parent_id = #{commentId})
  8. </update>
  9. <update id="updateCommentContentByCommentId" parameterType="org.dromara.domain.communityNews.CommentContent">
  10. update comment_content
  11. <trim prefix="SET" suffixOverrides=",">
  12. <if test="likeCount != null">like_count = #{likeCount},</if>
  13. </trim>
  14. where comment_id = #{commentId}
  15. </update>
  16. </mapper>