refactor: 重构消息、文章和疯言疯语的分页查询接口 refactor(controller): 调整疯言疯语控制器的更新接口参数 refactor(service): 优化消息服务的分页查询逻辑 fix: 修复JWT认证过滤器中的令牌验证问题 fix(properties): 修正生产环境数据库配置 style: 清理无用代码并删除HelpController
111 lines
3.6 KiB
Java
111 lines
3.6 KiB
Java
package com.qf.myafterprojecy.service;
|
||
|
||
import com.qf.myafterprojecy.exceptopn.ResponseMessage;
|
||
import com.qf.myafterprojecy.pojo.Article;
|
||
import com.qf.myafterprojecy.pojo.dto.ArriclePageDto;
|
||
import com.qf.myafterprojecy.pojo.dto.ArticleDto;
|
||
import com.qf.myafterprojecy.pojo.dto.ArticleTreeDto;
|
||
|
||
import org.springframework.data.domain.Page;
|
||
|
||
import java.util.List;
|
||
|
||
public interface IArticleService {
|
||
ResponseMessage<Article> getArticleById(String id);
|
||
|
||
ResponseMessage<List<Article>> getAllArticles();
|
||
|
||
/**
|
||
* 根据标题查询文章列表
|
||
*
|
||
* @param title 文章标题的一部分,用于模糊查询
|
||
* @return 返回符合查询条件的文章列表
|
||
*/
|
||
ResponseMessage<List<ArticleTreeDto>> getArticlesByTitle(String title);
|
||
/**
|
||
* 根据状态获取文章列表
|
||
* @param status 文章状态(0:未发表 1:已发表 2:已删除)
|
||
* @return 返回包含文章列表的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<List<ArticleTreeDto>> getArticlesByStatus(Integer status);
|
||
/**
|
||
* 获取文章数量
|
||
* @param status 文章状态(0:未发表 1:已发表 2:已删除)
|
||
* @return 返回文章数量
|
||
*/
|
||
ResponseMessage<Integer> getArticleCount(Integer status);
|
||
/**
|
||
* 创建新文章
|
||
* 仅限AUTHOR角色用户访问
|
||
*
|
||
* @param articleDto 包含文章数据的DTO对象
|
||
* @return 返回包含新创建文章信息的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<Article> saveArticle(ArticleDto articleDto);
|
||
|
||
/**
|
||
* 更新指定ID的文章
|
||
*
|
||
* @param id 文章ID
|
||
* @param articleDto 包含更新信息的ArticleDto对象
|
||
* @return 返回包含操作结果的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<Article> updateArticle(Integer id, ArticleDto articleDto);
|
||
|
||
/**
|
||
* 删除指定ID的文章
|
||
*
|
||
* @param id 文章ID
|
||
* @return 返回包含操作结果的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<Article> deleteArticle(Integer id);
|
||
|
||
/**
|
||
* 根据分类ID查询文章列表(兼容旧接口)
|
||
*
|
||
* @param typeid 分类ID
|
||
* @return 返回符合查询条件的文章列表
|
||
*/
|
||
ResponseMessage<List<Article>> getArticlesByCategory(Integer typeid);
|
||
|
||
/**
|
||
* 根据属性ID查询文章列表
|
||
*
|
||
* @param attributeid 属性ID
|
||
* @return 返回符合查询条件的文章列表
|
||
*/
|
||
ResponseMessage<List<Article>> getArticlesByAttribute(Integer attributeid);
|
||
|
||
/**
|
||
* 根据属性ID查询最新文章列表
|
||
*
|
||
* @param attributeid 属性ID
|
||
* @return 返回符合查询条件的最新文章列表
|
||
*/
|
||
ResponseMessage<List<Article>> getLatestArticlesByAttribute(Integer attributeid);
|
||
|
||
ResponseMessage<List<Article>> getMostViewedArticles();
|
||
|
||
/**
|
||
* 增加文章浏览量
|
||
*
|
||
* @param id 文章ID
|
||
* @return 返回包含更新后文章信息的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<Article> incrementViewCount(Integer id);
|
||
/**
|
||
* 获取已发布的文章列表
|
||
* @return 返回包含已发布文章列表的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<List<Article>> getPublishedArticles();
|
||
|
||
/**
|
||
* 根据状态分页查询文章列表
|
||
* @param status 文章状态(0:未发表 1:已发表 2:已删除)
|
||
* @param page 页码,从0开始
|
||
* @param size 每页大小
|
||
* @return 返回包含分页文章列表的ResponseMessage对象
|
||
*/
|
||
ResponseMessage<List<ArticleTreeDto>> getArticlesByStatusWithPagination(ArriclePageDto arriclePageDto);
|
||
}
|