1234567891011121314151617181920212223242526272829303132 |
- package com.nosum.deliver.posts.controller;
- import com.nosum.common.annotation.Explain;
- import com.nosum.common.base.domain.Result;
- import com.nosum.deliver.posts.domain.vo.PostsVO;
- import com.nosum.deliver.posts.service.PostsService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- @RequestMapping("/posts")
- public class PostsController {
- @Autowired
- private PostsService postsService;
- @Explain("按照时间归档文章数量")
- @GetMapping("/archive/v1/list")
- public Result<PostsVO> getArchiveTotalByDateList(PostsVO postsVO) {
- return postsService.getArchiveTotalByDateList(postsVO);
- }
- @Explain("查询文章统计")
- @GetMapping("/posts/v1/statistics")
- public Result getPostStatistics(){
- return this.postsService.getPostStatistics();
- }
- }
|