2021-03-27 17:29:56 +08:00
|
|
|
|
package cn.allms.service;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.allms.po.Blog;
|
|
|
|
|
|
import cn.allms.vo.BlogQuery;
|
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @Auther: 南迪叶先生:https://www.cnblogs.com/ye888/
|
|
|
|
|
|
* @Date: 2019/10/3
|
|
|
|
|
|
* @Description: com.yrp.po
|
|
|
|
|
|
* @version: 1.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
public interface BlogService {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通过id查询单条博客
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Blog getBlog(Long id);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通过id查询单条博客(前端使用)
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Blog getAadConvertBlog(Long id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 分页查询博客
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param pageable
|
|
|
|
|
|
* @param blog
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Page<Blog> ListBlog(Pageable pageable, BlogQuery blog);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 分页查询显示博客列表
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param pageable
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Page<Blog> ListBlog(Pageable pageable);
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-04 03:39:13 +08:00
|
|
|
|
Page<Blog> ListBlog(Long tagId, Pageable pageable);
|
2021-03-27 17:29:56 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 模糊查询分页显示博客列表
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param pageable
|
|
|
|
|
|
* @param query
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2021-07-04 03:39:13 +08:00
|
|
|
|
Page<Blog> ListBlog(Pageable pageable, String query);
|
2021-03-27 17:29:56 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 显示推荐的博客列表
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<Blog> listRecommendBlogTop(Integer size);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 显示归档信息
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2021-07-04 03:39:13 +08:00
|
|
|
|
Map<String, List<Blog>> archiveBlog();
|
2021-03-27 17:29:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long countBlog();
|
2021-07-04 03:39:13 +08:00
|
|
|
|
|
2021-03-27 17:29:56 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 修改
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param blog
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Blog saveBlog(Blog blog);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 修改
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param id
|
|
|
|
|
|
* @param blog
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2021-07-04 03:39:13 +08:00
|
|
|
|
Blog updateBlog(Long id, Blog blog);
|
2021-03-27 17:29:56 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除
|
2021-07-04 03:39:13 +08:00
|
|
|
|
*
|
2021-03-27 17:29:56 +08:00
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
|
|
|
|
|
void deleteBlog(Long id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|