update BaseMapper list rename to select

This commit is contained in:
Timi
2026-01-04 19:12:47 +08:00
parent 7eb409f6d0
commit 040a46934d
5 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@ public interface ArticleMapper extends BaseMapper<Article, Long> {
long countByPage(Page page);
@Override
List<Article> listByPage(Page page);
List<Article> selectByPage(Page page);
long countByKeyword(String keyword);

View File

@ -58,7 +58,7 @@ public class ArticleServiceImplement extends AbstractEntityService<Article, Long
@Override
public PageResult<Article> page(Page page) {
PageResult<Article> result = new PageResult<>();
result.setList(mapper.listByPage(page));
result.setList(mapper.selectByPage(page));
result.setTotal(mapper.countByPage(page));
return result;
}

View File

@ -22,7 +22,7 @@ public interface CommentMapper extends BaseMapper<Comment, Long> {
long countByPage(Page page);
@Override
List<Comment> listByPage(Page page);
List<Comment> selectByPage(Page page);
@Select("SELECT * FROM comment WHERE id = #{id}" + NOT_DELETE)
Comment select(Long id);

View File

@ -24,7 +24,7 @@
<select id="countByPage" resultType="long">
SELECT COUNT(1) <include refid="normalCondition" />
</select>
<select id="listByPage" resultType="com.imyeyu.api.modules.blog.entity.Article">
<select id="selectByPage" resultType="com.imyeyu.api.modules.blog.entity.Article">
SELECT
<include refid="listColumn" />
<include refid="normalCondition" />

View File

@ -3,7 +3,7 @@
<mapper namespace="com.imyeyu.api.modules.common.mapper.CommentMapper">
<sql id="table">comment</sql>
<!-- 主评论 -->
<select id="list" resultMap="listResult">
<select id="selectByPage" resultMap="selectResult">
SELECT
-- 主评论
comment.id,
@ -77,7 +77,7 @@
ON
reply_count.id = comment.id
</select>
<resultMap id="listResult" type="com.imyeyu.api.modules.common.vo.comment.CommentView">
<resultMap id="selectResult" type="com.imyeyu.api.modules.common.vo.comment.CommentView">
<id property="id" column="id" />
<result property="userId" column="user_id" />
<result property="nick" column="nick" />
@ -96,7 +96,7 @@
<result property="createdAt" column="reply_created_at" />
</collection>
</resultMap>
<select id="countAll" resultType="long">
<select id="countByPage" resultType="long">
SELECT
SUM(result.total_comment + result.total_reply)
FROM (