帖子post重提交
Change-Id: Ib28dc79d604faf43233c720031a4f18d84b22688
diff --git a/src/main/resources/mapper/PostMapper.xml b/src/main/resources/mapper/PostMapper.xml
index e676fcc..ad6024c 100644
--- a/src/main/resources/mapper/PostMapper.xml
+++ b/src/main/resources/mapper/PostMapper.xml
@@ -78,7 +78,7 @@
<!-- 更新置顶状态 -->
<update id="updatePinnedStatus" parameterType="map">
UPDATE post
- SET is_pinned = #{pinned}
+ SET is_pinned = #{isPinned}
WHERE postid = #{postid}
</update>
@@ -100,4 +100,10 @@
ORDER BY is_pinned DESC, postCreatedTime DESC
</select>
+ <!-- ✅ 根据 postid 查询单个帖子 -->
+ <select id="selectById" parameterType="int" resultType="com.pt5.pthouduan.entity.Post">
+ SELECT * FROM post
+ WHERE postid = #{postid}
+ </select>
+
</mapper>