forest/src/main/java/com/rymcu/vertical/service/ArticleService.java

72 lines
1.6 KiB
Java
Raw Normal View History

2019-11-17 01:24:42 +08:00
package com.rymcu.vertical.service;
import com.rymcu.vertical.core.service.Service;
2019-11-18 01:22:27 +08:00
import com.rymcu.vertical.dto.ArticleDTO;
2019-11-17 01:24:42 +08:00
import com.rymcu.vertical.entity.Article;
2019-12-02 09:39:23 +08:00
import com.rymcu.vertical.web.api.exception.BaseApiException;
2019-11-17 01:24:42 +08:00
2019-11-18 01:22:27 +08:00
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
2019-11-18 01:22:27 +08:00
import java.util.List;
import java.util.Map;
2019-12-06 17:45:04 +08:00
/**
* @author ronger
*/
2019-11-17 01:24:42 +08:00
public interface ArticleService extends Service<Article> {
2019-12-06 17:45:04 +08:00
/**
* 根据检索内容/标签查询文章列表
* @param searchText
* @param tag
* @return
* */
List<ArticleDTO> findArticles(String searchText, String tag);
2019-11-18 01:22:27 +08:00
2019-12-06 17:45:04 +08:00
/**
* 查询文章详情信息
* @param id
* @param i
* @return
* */
ArticleDTO findArticleDTOById(Integer id, int i);
2019-12-06 17:45:04 +08:00
/**
* 查询主题下文章列表
* @param name
* @return
* */
List<ArticleDTO> findArticlesByTopicName(String name);
2019-12-06 17:45:04 +08:00
/**
* 查询标签下文章列表
* @param name
* @return
* */
List<ArticleDTO> findArticlesByTagName(String name);
2019-12-06 17:45:04 +08:00
/**
* 查询用户文章列表
* @param idUser
* @return
* */
List<ArticleDTO> findUserArticlesByIdUser(Integer idUser);
2019-12-06 17:45:04 +08:00
/**
* 新增/更新文章
* @param article
* @param request
* @throws UnsupportedEncodingException
* @throws BaseApiException
* @return
* */
2019-12-02 09:39:23 +08:00
Map postArticle(ArticleDTO article, HttpServletRequest request) throws UnsupportedEncodingException, BaseApiException;
2019-12-18 01:14:18 +08:00
/**
* 删除文章
* @param id
* @return
* */
Map delete(Integer id);
2019-11-17 01:24:42 +08:00
}