我是人,我提交了悬赏功能哦!悬赏功能是:1.人可以发布悬赏 2.人可以回复悬赏 3.只有回复人和悬赏发布者可以下载回复的附件

Change-Id: I269fb69c6ee4dd695a38fa0c91fa8fbe72fc5322
diff --git a/ruoyi-system/src/main/resources/mapper/bounty/BountySubmissionMapper.xml b/ruoyi-system/src/main/resources/mapper/bounty/BountySubmissionMapper.xml
new file mode 100644
index 0000000..67d7947
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/bounty/BountySubmissionMapper.xml
@@ -0,0 +1,51 @@
+<?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="bounty.mapper.BountySubmissionMapper">
+    <!-- 继承 BaseMapper 的默认方法(如 insert、selectById 等),无需重复定义 -->
+    
+    <!-- 示例:自定义分页查询(若默认方法不满足需求) -->
+    <select id="getBountySubmissionsByPage" resultType="bounty.domain.BountySubmission">
+        SELECT * FROM bounty_submissions
+        WHERE bounty_id = #{bountyId}
+        LIMIT #{offset}, #{pageSize}
+    </select>
+
+    <insert id="insert" parameterType="bounty.domain.BountySubmission">
+        INSERT INTO bounty_submissions (
+        bounty_id,
+        user_id,
+        content,
+        attachment, <!-- 新增字段 -->
+        create_time,
+        status
+        ) VALUES (
+        #{bountyId},
+        #{userId},
+        #{content},
+        #{attachment}, <!-- 绑定字段 -->
+        NOW(),
+        '0'
+        )
+    </insert>
+
+    <select id="getSubmissionsByBountyId" resultType="bounty.domain.BountySubmission">
+        SELECT id, user_id AS userId, content, attachment, status
+        FROM bounty_submissions
+        WHERE bounty_id = #{bountyId}
+    </select>
+
+    <!-- BountySubmissionMapper.xml -->
+    <update id="updateById" parameterType="bounty.domain.BountySubmission">
+        UPDATE bounty_submissions
+        SET
+            status = #{et.status}
+        WHERE id = #{et.id}
+    </update>
+
+    <select id="selectById" resultType="bounty.domain.BountySubmission">
+        SELECT id, bounty_id AS bountyId, user_id AS userId, content, attachment, status
+        FROM bounty_submissions
+        WHERE id = #{id}
+    </select>
+
+</mapper>
\ No newline at end of file