SecondaryArchiveController.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. package com.gz.controller.archive;
  2. import com.github.pagehelper.PageInfo;
  3. import com.gz.dto.archive.ArchiveDTO;
  4. import com.gz.dto.archive.SecondaryArchiveDTO;
  5. import com.gz.service.archive.SecondaryArchiveService;
  6. import com.gz.vo.PageVO;
  7. import com.gz.vo.archive.SecondaryArchiveVO;
  8. import org.springframework.web.bind.annotation.*;
  9. import javax.annotation.Resource;
  10. import java.util.List;
  11. /**
  12. * @author LiuchangLan
  13. * @date 2021/3/2 18:34
  14. */
  15. @RestController
  16. @RequestMapping("secondary/archive")
  17. public class SecondaryArchiveController {
  18. @Resource
  19. private SecondaryArchiveService service;
  20. /**
  21. * @description 增
  22. * @author LiuChangLan
  23. * @since 2020/9/4 14:46
  24. */
  25. @PostMapping("insert")
  26. Integer insert(@RequestBody SecondaryArchiveDTO dto) throws Exception{
  27. return service.insert(dto);
  28. }
  29. /**
  30. * @description 删
  31. * @author LiuChangLan
  32. * @since 2020/9/4 14:46
  33. */
  34. @DeleteMapping("delete")
  35. Integer delete(Integer id){
  36. return service.delete(id);
  37. }
  38. /**
  39. * @description 改
  40. * @author LiuChangLan
  41. * @since 2020/9/4 14:46
  42. */
  43. @PostMapping("update")
  44. Integer update(@RequestBody SecondaryArchiveDTO dto){
  45. return service.update(dto);
  46. }
  47. /**
  48. * @description 分页查询
  49. * @author LiuChangLan
  50. * @since 2020/9/4 14:46
  51. */
  52. @GetMapping("selectByPage")
  53. PageInfo<SecondaryArchiveDTO> selectByPage(SecondaryArchiveVO vo){
  54. return service.selectByPage(vo);
  55. }
  56. /**
  57. * @description 根据主键查询
  58. * @author LiuChangLan
  59. * @since 2021/3/2 19:24
  60. */
  61. @GetMapping("selectByPrimaryKey")
  62. SecondaryArchiveDTO selectByPrimaryKey(Integer id) {
  63. return service.selectByPrimaryKey(id);
  64. }
  65. /**
  66. * @description 根据文档id查询卷内目录
  67. * @author LiuChangLan
  68. * @since 2021/3/9 15:35
  69. */
  70. @GetMapping("selectByArchiveId")
  71. List<SecondaryArchiveDTO> selectByArchiveId(Integer archiveId){
  72. return service.selectByArchiveId(archiveId);
  73. }
  74. }