feat(分类属性): 实现分类属性管理功能

新增分类属性相关实体、DTO、仓库、服务及控制器
扩展文章服务以支持按属性查询文章
重构文章实体将typeid改为attributeid
添加按标题查询文章功能
This commit is contained in:
qingfeng1121
2025-10-16 16:34:36 +08:00
parent 8cc4c1da1d
commit ffea3e85ae
15 changed files with 1513 additions and 2039 deletions

View File

@@ -9,9 +9,34 @@ import java.util.List;
public interface IArticleService {
ResponseMessage<Article> getArticleById(String id);
ResponseMessage<List<Article>> getAllArticles();
/**
* 根据标题查询文章列表
* @param title 文章标题的一部分,用于模糊查询
* @return 返回符合查询条件的文章列表
*/
ResponseMessage<List<Article>> getArticlesByTitle(String title);
ResponseMessage<Article> saveArticle(ArticleDto articleDto);
ResponseMessage<Article> updateArticle(Integer id, ArticleDto articleDto);
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();
}