SupplierInfoController.java 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package com.fjhx.supply.controller.supplier;
  2. import com.baomidou.dynamic.datasource.annotation.DS;
  3. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  4. import com.fjhx.common.constant.SourceConstant;
  5. import com.fjhx.supply.entity.supplier.dto.SupplierInfoDto;
  6. import com.fjhx.supply.entity.supplier.dto.SupplierInfoSelectDto;
  7. import com.fjhx.supply.entity.supplier.vo.SupplierInfoVo;
  8. import com.fjhx.supply.service.supplier.SupplierInfoService;
  9. import com.ruoyi.common.core.domain.BaseSelectDto;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. /**
  16. * <p>
  17. * 供应商 前端控制器
  18. * </p>
  19. *
  20. * @author
  21. * @since 2023-03-17
  22. */
  23. @DS(SourceConstant.SUPPLY)
  24. @RestController
  25. @RequestMapping("/supplierInfo")
  26. public class SupplierInfoController {
  27. @Autowired
  28. private SupplierInfoService supplierInfoService;
  29. /**
  30. * 供应商分页
  31. */
  32. @PostMapping("/page")
  33. public Page<SupplierInfoVo> page(@RequestBody SupplierInfoSelectDto dto) {
  34. return supplierInfoService.getPage(dto);
  35. }
  36. /**
  37. * 供应商分页 维多利亚
  38. */
  39. @PostMapping("/pageByWdly")
  40. public Page<SupplierInfoVo> pageByWdly(@RequestBody SupplierInfoSelectDto dto) {
  41. return supplierInfoService.getPageByWdly(dto);
  42. }
  43. /**
  44. * 供应商明细
  45. */
  46. @PostMapping("/detail")
  47. public SupplierInfoVo detail(@RequestBody BaseSelectDto dto) {
  48. return supplierInfoService.detail(dto.getId());
  49. }
  50. /**
  51. * 供应商新增
  52. */
  53. @PostMapping("/add")
  54. public void add(@RequestBody SupplierInfoDto supplierInfoDto) {
  55. supplierInfoService.add(supplierInfoDto);
  56. }
  57. /**
  58. * 供应商编辑
  59. */
  60. @PostMapping("/edit")
  61. public void edit(@RequestBody SupplierInfoDto supplierInfoDto) {
  62. supplierInfoService.edit(supplierInfoDto);
  63. }
  64. /**
  65. * 供应商删除
  66. */
  67. @PostMapping("/delete")
  68. public void delete(@RequestBody BaseSelectDto dto) {
  69. supplierInfoService.delete(dto.getId());
  70. }
  71. }