AfterSalesController.java 1.6 KB

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