SmsbItemPushDeviceController.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package com.inspur.source.controller;
  2. import com.inspur.source.domain.bo.SmsbItemPushDeviceBo;
  3. import com.inspur.source.domain.bo.SmsbItemPushPlaylistBo;
  4. import com.inspur.source.domain.vo.SmsbItemPushPlaylistVo;
  5. import com.inspur.source.service.ISmsbItemPushDeviceService;
  6. import lombok.RequiredArgsConstructor;
  7. import org.dromara.common.core.domain.R;
  8. import org.dromara.common.log.annotation.Log;
  9. import org.dromara.common.log.enums.BusinessType;
  10. import org.dromara.common.web.core.BaseController;
  11. import org.springframework.validation.annotation.Validated;
  12. import org.springframework.web.bind.annotation.*;
  13. import java.util.List;
  14. /**
  15. * 内容发布设备
  16. *
  17. * @author Hao Li
  18. * @date 2025-02-28
  19. */
  20. @Validated
  21. @RequiredArgsConstructor
  22. @RestController
  23. @RequestMapping("/source/itemPushDevice")
  24. public class SmsbItemPushDeviceController extends BaseController {
  25. private final ISmsbItemPushDeviceService smsbItemPushDeviceService;
  26. /**
  27. * 查询内容发布设备列表
  28. */
  29. @GetMapping("/list/v2")
  30. public R<List<SmsbItemPushPlaylistVo>> getPushDevicelist(SmsbItemPushPlaylistBo bo) {
  31. return R.ok(smsbItemPushDeviceService.getPushDeviceList(bo));
  32. }
  33. /**
  34. * 查询内容发布设备列表
  35. *//*
  36. @GetMapping("/list")
  37. public TableDataInfo<SmsbItemPushDeviceVo> list(SmsbItemPushDeviceBo bo, PageQuery pageQuery) {
  38. return smsbItemPushDeviceService.queryPageList(bo, pageQuery);
  39. }
  40. *//**
  41. * 导出内容发布设备列表
  42. *//*
  43. @Log(title = "内容发布设备", businessType = BusinessType.EXPORT)
  44. @PostMapping("/export")
  45. public void export(SmsbItemPushDeviceBo bo, HttpServletResponse response) {
  46. List<SmsbItemPushDeviceVo> list = smsbItemPushDeviceService.queryList(bo);
  47. ExcelUtil.exportExcel(list, "内容发布设备", SmsbItemPushDeviceVo.class, response);
  48. }
  49. *//**
  50. * 获取内容发布设备详细信息
  51. *
  52. * @param id 主键
  53. *//*
  54. @GetMapping("/{id}")
  55. public R<SmsbItemPushDeviceVo> getInfo(@NotNull(message = "主键不能为空")
  56. @PathVariable Long id) {
  57. return R.ok(smsbItemPushDeviceService.queryById(id));
  58. }
  59. *//**
  60. * 新增内容发布设备
  61. *//*
  62. @Log(title = "内容发布设备", businessType = BusinessType.INSERT)
  63. @RepeatSubmit()
  64. @PostMapping()
  65. public R<Void> add(@Validated(AddGroup.class) @RequestBody SmsbItemPushDeviceBo bo) {
  66. return toAjax(smsbItemPushDeviceService.insertByBo(bo));
  67. }
  68. *//**
  69. * 修改内容发布设备
  70. *//*
  71. @Log(title = "内容发布设备", businessType = BusinessType.UPDATE)
  72. @RepeatSubmit()
  73. @PutMapping()
  74. public R<Void> edit(@Validated(EditGroup.class) @RequestBody SmsbItemPushDeviceBo bo) {
  75. return toAjax(smsbItemPushDeviceService.updateByBo(bo));
  76. }
  77. *//**
  78. * 删除内容发布设备
  79. *
  80. * @param ids 主键串
  81. *//*
  82. @Log(title = "内容发布设备", businessType = BusinessType.DELETE)
  83. @DeleteMapping("/{ids}")
  84. public R<Void> remove(@NotEmpty(message = "主键不能为空")
  85. @PathVariable Long[] ids) {
  86. return toAjax(smsbItemPushDeviceService.deleteWithValidByIds(List.of(ids), true));
  87. }
  88. */
  89. /**
  90. * 内容发布设备下架
  91. *
  92. * @param bo
  93. */
  94. @Log(title = "内容发布下架", businessType = BusinessType.DELETE)
  95. @DeleteMapping("/remove")
  96. public R<Void> pushRemoveDevice(@RequestBody SmsbItemPushDeviceBo bo) {
  97. return smsbItemPushDeviceService.pushRemoveDevice(bo);
  98. }
  99. }