GoodsSeriesController.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package com.dk.mdm.controller.mst;
  2. import com.dk.common.response.ResponseResultVO;
  3. import com.dk.mdm.model.pojo.mst.GoodsSeries;
  4. import com.dk.common.controller.BaseController;
  5. import com.dk.common.service.BaseService;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.RestController;
  11. import io.swagger.annotations.Api;
  12. import com.dk.mdm.service.mst.GoodsSeriesService;
  13. @Api(tags = "商品系列API接口")
  14. @RestController
  15. @RequestMapping("/mst/goodsSeries")
  16. public class GoodsSeriesController{
  17. public BaseService<GoodsSeries> getService() {
  18. return goodsSeriesService;
  19. }
  20. @Autowired
  21. private GoodsSeriesService goodsSeriesService;
  22. /**
  23. * @desc : 停用
  24. * @author : 于继渤
  25. * @date : 2023/1/4 9:39
  26. */
  27. @PostMapping("disable/{id}")
  28. public ResponseResultVO<Boolean> disable(@PathVariable String id) {
  29. return this.getService().disable(id);
  30. }
  31. /**
  32. * @desc : 启用
  33. * @author : 于继渤
  34. * @date : 2023/1/4 9:39
  35. */
  36. @PostMapping("enable/{id}")
  37. public ResponseResultVO<Boolean> enable(@PathVariable String id) {
  38. return this.getService().enable(id);
  39. }
  40. }