文章目录
帖子详情
DiscusPostMapper
增加查看帖子的方法
//增加查看帖子的方法
DiscussPost selectDiscussPostById(int id);
//在discuss-mapper.xml中
<!-- 实现查看帖子的select语句 -->
<select id="selectDiscussPostById" resultType="DiscussPost">
select <include refid="selectFields"></include>
from discuss_post
where id = #{
id}
</select>
DiscussPostService
增加一个查询方法
//添加一个查看帖子的方法