WeSopBaseController.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.linkwechat.controller;
  2. import com.linkwechat.common.core.controller.BaseController;
  3. import com.linkwechat.common.core.domain.AjaxResult;
  4. import com.linkwechat.common.core.page.TableDataInfo;
  5. import com.linkwechat.domain.sop.vo.WeSopAddQueryVo;
  6. import com.linkwechat.domain.sop.vo.WeSopQueryListVo;
  7. import com.linkwechat.service.IWeSopBaseService;
  8. import io.swagger.annotations.Api;
  9. import io.swagger.annotations.ApiOperation;
  10. import lombok.extern.slf4j.Slf4j;
  11. import org.springframework.web.bind.annotation.*;
  12. import javax.annotation.Resource;
  13. /**
  14. * @author quchen
  15. * @date 2025/9/2 10:29
  16. */
  17. @Slf4j
  18. @RestController
  19. @RequestMapping(value = "sop")
  20. @Api(tags = "活动管理")
  21. public class WeSopBaseController extends BaseController {
  22. @Resource
  23. private IWeSopBaseService weSopBaseService;
  24. @PostMapping(value = "addSop")
  25. @ApiOperation(value = "新增活动", httpMethod = "POST")
  26. public AjaxResult addSop(@RequestBody WeSopAddQueryVo weSopAddQueryVo) {
  27. return AjaxResult.success(weSopBaseService.addSop(weSopAddQueryVo));
  28. }
  29. @PostMapping(value = "updateSop")
  30. public AjaxResult updateSop(@RequestBody WeSopAddQueryVo weSopAddQueryVo) {
  31. return AjaxResult.success(weSopBaseService.updateSop(weSopAddQueryVo));
  32. }
  33. @GetMapping(value = "deleteSop")
  34. public AjaxResult deleteSop(@RequestParam("id") String id) {
  35. return weSopBaseService.deleteSop(id);
  36. }
  37. @GetMapping(value = "disableStatus")
  38. public AjaxResult disableStatus(@RequestParam("id") String id) {
  39. return weSopBaseService.disableStatus(id);
  40. }
  41. @GetMapping(value = "getSop")
  42. public AjaxResult getSop(@RequestParam("id") String id) {
  43. return AjaxResult.success(weSopBaseService.getById(id));
  44. }
  45. @GetMapping(value = "copySop")
  46. public AjaxResult copySop(@RequestParam("id") String id) {
  47. return AjaxResult.success(weSopBaseService.copySop(id));
  48. }
  49. @GetMapping(value = "listSop")
  50. public TableDataInfo listSop(WeSopQueryListVo weSopQueryListVo) {
  51. startPage();
  52. return getDataTable(weSopBaseService.listSop(weSopQueryListVo));
  53. }
  54. }