文章展示内容问题处理
This commit is contained in:
parent
87e5404aa8
commit
504941eafb
@ -24,6 +24,6 @@ public class ArticleVO {
|
||||
@ApiModelProperty(value = "文章排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "状态, allowableValues = OPEN,CLOSE")
|
||||
@ApiModelProperty(value = "开启状态")
|
||||
private Boolean openStatus;
|
||||
}
|
||||
|
@ -21,6 +21,12 @@ import java.util.List;
|
||||
@CacheConfig(cacheNames = "{article}")
|
||||
public interface ArticleService extends IService<Article> {
|
||||
|
||||
/**
|
||||
* 管理端获取文章
|
||||
* @param articleSearchParams
|
||||
* @return
|
||||
*/
|
||||
IPage<ArticleVO> managerArticlePage(ArticleSearchParams articleSearchParams);
|
||||
/**
|
||||
* 获取文章分页
|
||||
*
|
||||
|
@ -34,11 +34,19 @@ import java.util.List;
|
||||
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {
|
||||
|
||||
@Override
|
||||
public IPage<ArticleVO> articlePage(ArticleSearchParams articleSearchParams) {
|
||||
public IPage<ArticleVO> managerArticlePage(ArticleSearchParams articleSearchParams) {
|
||||
articleSearchParams.setSort("a.sort");
|
||||
return this.baseMapper.getArticleList(PageUtil.initPage(articleSearchParams), articleSearchParams.queryWrapper());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ArticleVO> articlePage(ArticleSearchParams articleSearchParams) {
|
||||
articleSearchParams.setSort("a.sort");
|
||||
QueryWrapper queryWrapper = articleSearchParams.queryWrapper();
|
||||
queryWrapper.eq("open_status",true);
|
||||
return this.baseMapper.getArticleList(PageUtil.initPage(articleSearchParams), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Article> list(String categoryId) {
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class ArticleManagerController {
|
||||
})
|
||||
@GetMapping(value = "/getByPage")
|
||||
public ResultMessage<IPage<ArticleVO>> getByPage(ArticleSearchParams articleSearchParams) {
|
||||
return ResultUtil.data(articleService.articlePage(articleSearchParams));
|
||||
return ResultUtil.data(articleService.managerArticlePage(articleSearchParams));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加文章")
|
||||
|
Loading…
x
Reference in New Issue
Block a user