blob: 139e0e1b373adebd020aec48af7c06cc0729edb4 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysTorrentCommentMapper">
<insert id="insertComment" parameterType="com.ruoyi.system.domain.SysTorrentComment">
insert into sys_torrent_comment (torrent_id, user_id, content, parent_id, create_time)
values (#{torrentId}, #{userId}, #{content}, #{parentId}, sysdate())
</insert>
<select id="selectCommentListByTorrentId" resultType="com.ruoyi.system.domain.SysTorrentComment">
select comment_id, torrent_id, user_id, content, parent_id, create_time
from sys_torrent_comment
where torrent_id = #{torrentId}
order by create_time desc
</select>
<delete id="deleteCommentById">
delete from sys_torrent_comment where comment_id = #{commentId}
</delete>
</mapper>