CusFollowController.java 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. package com.dk.mdm.controller.mst;
  2. import com.dk.common.model.pojo.PageList;
  3. import com.dk.common.response.ResponseResultVO;
  4. import com.dk.mdm.model.pojo.mst.CusFollow;
  5. import com.dk.common.controller.BaseController;
  6. import com.dk.common.service.BaseService;
  7. import com.dk.mdm.model.pojo.mst.MeasureReceipt;
  8. import com.dk.mdm.model.query.mst.CusFollowQuery;
  9. import com.dk.mdm.model.query.mst.CustomerQuery;
  10. import com.dk.mdm.model.response.mst.CusFollowResponse;
  11. import com.dk.mdm.model.response.mst.CustomerResponse;
  12. import com.dk.mdm.model.vo.mst.CusFollowVO;
  13. import com.dk.mdm.model.vo.mst.CustomerVO;
  14. import com.dk.mdm.model.vo.mst.MeasureReceiptVO;
  15. import io.swagger.annotations.ApiOperation;
  16. import org.springframework.web.bind.annotation.*;
  17. import org.springframework.beans.factory.annotation.Autowired;
  18. import io.swagger.annotations.Api;
  19. import com.dk.mdm.service.mst.CusFollowService;
  20. import javax.validation.Valid;
  21. import java.util.List;
  22. import java.util.Map;
  23. @Api(tags = "客户跟进API接口")
  24. @RestController
  25. @RequestMapping("/mst/cusFollow")
  26. public class CusFollowController{
  27. public BaseService<CusFollow> getService() {
  28. return cusFollowService;
  29. }
  30. @Autowired
  31. private CusFollowService cusFollowService;
  32. /**
  33. * @desc : 条件查询
  34. * @author : 于继渤
  35. * @date : 2024/2/26 10:36
  36. */
  37. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  38. @PostMapping({"list_by"})
  39. public ResponseResultVO<PageList<CusFollowResponse>> selectByCond(@RequestBody CusFollowQuery customerQuery) {
  40. return cusFollowService.selectByCond(customerQuery);
  41. }
  42. /**
  43. * @desc : 新建
  44. * @author : 于继渤
  45. * @date : 2023/1/5 9:39
  46. */
  47. @ApiOperation( value = "新建", notes = "v" )
  48. @PostMapping({"insert"})
  49. public ResponseResultVO<?> insert(@RequestBody CusFollowVO cusFollowVO) {
  50. return cusFollowService.insert(cusFollowVO);
  51. }
  52. /**
  53. * @desc : 查询跟进记录
  54. * @author : 于继渤
  55. * @date : 2024/2/26 10:36
  56. */
  57. @ApiOperation(value = "条件查询", notes = "条件查询")
  58. @PostMapping({"select_by_list"})
  59. public ResponseResultVO<List<CusFollowResponse>> selectByList(@RequestBody CusFollowQuery customerQuery) {
  60. return cusFollowService.selectByList(customerQuery);
  61. }
  62. /**
  63. * @desc : 新建量尺回执
  64. * @author : 于继渤
  65. * @date : 2023/1/5 9:39
  66. */
  67. @ApiOperation( value = "新建量尺回执", notes = "v" )
  68. @PostMapping({"save_measure"})
  69. public ResponseResultVO<?> saveMeasure(@RequestBody CusFollowVO cusFollowVO) {
  70. return cusFollowService.saveMeasure(cusFollowVO);
  71. }
  72. /**
  73. * @desc : 新建量尺回执
  74. * @author : 于继渤
  75. * @date : 2023/1/5 9:39
  76. */
  77. @ApiOperation( value = "新建量尺回执", notes = "v" )
  78. @PostMapping({"update_measure"})
  79. public ResponseResultVO<?> updateMeasure(@RequestBody MeasureReceiptVO measureReceipt) {
  80. return cusFollowService.updateMeasure(measureReceipt);
  81. }
  82. @ApiOperation(
  83. value = "编辑",
  84. notes = "编辑"
  85. )
  86. @PostMapping("update")
  87. public ResponseResultVO<?> update(@Valid @RequestBody CusFollowVO cusFollowVO) {
  88. return cusFollowService.update(cusFollowVO);
  89. }
  90. /**
  91. * @desc : 跟进id查询
  92. * @author : 于继渤
  93. * @date : 2024/2/26 10:36
  94. */
  95. @ApiOperation(value = "跟进id查询", notes = "跟进id查询")
  96. @PostMapping({"{id}"})
  97. public ResponseResultVO<?> selectById(@PathVariable String id) {
  98. return cusFollowService.selectById(new CusFollowQuery().setFollowId(id));
  99. }
  100. /**
  101. * @desc : 查询跟进记录
  102. * @author : 于继渤
  103. * @date : 2024/2/26 10:36
  104. */
  105. @ApiOperation(value = "条件查询", notes = "条件查询")
  106. @PostMapping({"select_cus_follow"})
  107. public ResponseResultVO<List<Map>> selectCusFollow(@RequestBody CusFollowQuery customerQuery) {
  108. return cusFollowService.selectCusFollow(customerQuery);
  109. }
  110. }