feat: 完成 Tracker 项目与 Torrent 种子模块的前后端接口与页面开发
- 实现 Tracker 项目、任务、任务日志、项目用户关联等模块的接口封装与 ProTable 页面
- 实现 Torrent 种子主表、文件列表、Tracker 服务器、标签模块的前后端接口封装
- 支持新增、编辑、删除、详情查看等完整 CRUD 功能
- 页面基于 Ant Design Pro,支持分页、筛选、Drawer + Modal 表单展示
Change-Id: If8ead64a0bf6c177545f1c3c348ee09cad221a85
diff --git a/ruoyi-admin/src/main/resources/mapper/system/BtTorrentAnnounceMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BtTorrentAnnounceMapper.xml
new file mode 100644
index 0000000..8b78641
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/mapper/system/BtTorrentAnnounceMapper.xml
@@ -0,0 +1,61 @@
+<?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.torrent.mapper.BtTorrentAnnounceMapper">
+
+ <resultMap type="BtTorrentAnnounce" id="BtTorrentAnnounceResult">
+ <result property="id" column="id" />
+ <result property="torrentId" column="torrent_id" />
+ <result property="announceUrl" column="announce_url" />
+ </resultMap>
+
+ <sql id="selectBtTorrentAnnounceVo">
+ select id, torrent_id, announce_url from bt_torrent_announce
+ </sql>
+
+ <select id="selectBtTorrentAnnounceList" parameterType="BtTorrentAnnounce" resultMap="BtTorrentAnnounceResult">
+ <include refid="selectBtTorrentAnnounceVo"/>
+ <where>
+ <if test="torrentId != null "> and torrent_id = #{torrentId}</if>
+ <if test="announceUrl != null and announceUrl != ''"> and announce_url = #{announceUrl}</if>
+ </where>
+ </select>
+
+ <select id="selectBtTorrentAnnounceById" parameterType="Long" resultMap="BtTorrentAnnounceResult">
+ <include refid="selectBtTorrentAnnounceVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertBtTorrentAnnounce" parameterType="BtTorrentAnnounce" useGeneratedKeys="true" keyProperty="id">
+ insert into bt_torrent_announce
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="torrentId != null">torrent_id,</if>
+ <if test="announceUrl != null and announceUrl != ''">announce_url,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="torrentId != null">#{torrentId},</if>
+ <if test="announceUrl != null and announceUrl != ''">#{announceUrl},</if>
+ </trim>
+ </insert>
+
+ <update id="updateBtTorrentAnnounce" parameterType="BtTorrentAnnounce">
+ update bt_torrent_announce
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="torrentId != null">torrent_id = #{torrentId},</if>
+ <if test="announceUrl != null and announceUrl != ''">announce_url = #{announceUrl},</if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <delete id="deleteBtTorrentAnnounceById" parameterType="Long">
+ delete from bt_torrent_announce where id = #{id}
+ </delete>
+
+ <delete id="deleteBtTorrentAnnounceByIds" parameterType="String">
+ delete from bt_torrent_announce where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+</mapper>
\ No newline at end of file