Browse Source

文章排序

Yangzw 1 month ago
parent
commit
021da9c780

+ 3 - 0
feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/controller/app/article/vo/article/AppArticlePageReqVO.java

@@ -11,4 +11,7 @@ public class AppArticlePageReqVO extends PageParam {
     @Schema(description = "分类编号", example = "2048")
     @Schema(description = "分类编号", example = "2048")
     private Long categoryId;
     private Long categoryId;
 
 
+    @Schema(description = "文章标题")
+    private String title;
+
 }
 }

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

@@ -45,6 +45,7 @@ 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())
+                .likeIfPresent(ArticleDO::getTitle, pageReqVO.getTitle())
                 .orderByAsc(ArticleDO::getSort));
                 .orderByAsc(ArticleDO::getSort));
     }
     }