AfterSalesController.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.fjhx.sale.controller.after;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.fjhx.sale.entity.after.dto.AfterSalesDto;
  4. import com.fjhx.sale.entity.after.dto.AfterSalesSelectDto;
  5. import com.fjhx.sale.entity.after.vo.AfterSalesVo;
  6. import com.fjhx.sale.service.after.AfterSalesService;
  7. import com.ruoyi.common.core.domain.BaseSelectDto;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.PostMapping;
  10. import org.springframework.web.bind.annotation.RequestBody;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. /**
  14. * <p>
  15. * sale_售后管理 前端控制器
  16. * </p>
  17. *
  18. * @author
  19. * @since 2024-01-31
  20. */
  21. @RestController
  22. @RequestMapping("/afterSales")
  23. public class AfterSalesController {
  24. @Autowired
  25. private AfterSalesService afterSalesService;
  26. /**
  27. * 售后管理分页
  28. */
  29. @PostMapping("/page")
  30. public Page<AfterSalesVo> page(@RequestBody AfterSalesSelectDto dto) {
  31. return afterSalesService.getPage(dto);
  32. }
  33. /**
  34. * 售后管理明细
  35. */
  36. @PostMapping("/detail")
  37. public AfterSalesVo detail(@RequestBody BaseSelectDto dto) {
  38. return afterSalesService.detail(dto.getId());
  39. }
  40. /**
  41. * 售后管理新增
  42. */
  43. @PostMapping("/add")
  44. public void add(@RequestBody AfterSalesDto afterSalesDto) {
  45. afterSalesService.add(afterSalesDto);
  46. }
  47. /**
  48. * sale_售后管理编辑
  49. */
  50. @PostMapping("/edit")
  51. public void edit(@RequestBody AfterSalesDto afterSalesDto) {
  52. afterSalesService.edit(afterSalesDto);
  53. }
  54. /**
  55. * sale_售后管理删除
  56. */
  57. @PostMapping("/delete")
  58. public void delete(@RequestBody BaseSelectDto dto) {
  59. afterSalesService.delete(dto.getId());
  60. }
  61. }