Browse Source

文章排序

Yangzw 1 month ago
parent
commit
be4319b6c6

+ 2 - 1
feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/dal/mysql/article/ArticleMapper.java

@@ -44,7 +44,8 @@ public interface ArticleMapper extends BaseMapperX<ArticleDO> {
 
 
     default PageResult<ArticleDO> selectPage(AppArticlePageReqVO pageReqVO) {
     default PageResult<ArticleDO> selectPage(AppArticlePageReqVO pageReqVO) {
         return selectPage(pageReqVO, new LambdaQueryWrapperX<ArticleDO>()
         return selectPage(pageReqVO, new LambdaQueryWrapperX<ArticleDO>()
-                .eqIfPresent(ArticleDO::getCategoryId, pageReqVO.getCategoryId()));
+                .eqIfPresent(ArticleDO::getCategoryId, pageReqVO.getCategoryId())
+                .orderByAsc(ArticleDO::getSort));
     }
     }
 
 
     default void updateBrowseCount(Long id) {
     default void updateBrowseCount(Long id) {