ArchiveController.java 927 B

123456789101112131415161718192021222324252627
  1. package com.nosum.deliver.posts.controller;
  2. import com.nosum.common.base.domain.Result;
  3. import com.nosum.deliver.posts.domain.vo.PostsVO;
  4. import com.nosum.deliver.posts.service.PostsService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. @RestController
  10. @RequestMapping("/archive")
  11. public class ArchiveController {
  12. @Autowired
  13. private PostsService postsService;
  14. @GetMapping("/archive/v1/list")
  15. public Result<PostsVO> getArchiveTotalByDateList(PostsVO postsVO) {
  16. return postsService.getArchiveTotalByDateList(postsVO);
  17. }
  18. @GetMapping("/year/v1/list")
  19. public Result<PostsVO> getArchiveGroupYearList(PostsVO postsVO) {
  20. return postsService.getArchiveGroupYearList(postsVO);
  21. }
  22. }