package com.inspur.source.controller; import com.inspur.source.domain.bo.SmsbItemPushDeviceBo; import com.inspur.source.domain.bo.SmsbItemPushPlaylistBo; import com.inspur.source.domain.vo.SmsbItemPushPlaylistVo; import com.inspur.source.service.ISmsbItemPushDeviceService; import lombok.RequiredArgsConstructor; import org.dromara.common.core.domain.R; import org.dromara.common.log.annotation.Log; import org.dromara.common.log.enums.BusinessType; import org.dromara.common.web.core.BaseController; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 内容发布设备 * * @author Hao Li * @date 2025-02-28 */ @Validated @RequiredArgsConstructor @RestController @RequestMapping("/source/itemPushDevice") public class SmsbItemPushDeviceController extends BaseController { private final ISmsbItemPushDeviceService smsbItemPushDeviceService; /** * 查询内容发布设备列表 */ @GetMapping("/list/v2") public R> getPushDevicelist(SmsbItemPushPlaylistBo bo) { return R.ok(smsbItemPushDeviceService.getPushDeviceList(bo)); } /** * 查询内容发布设备列表 *//* @GetMapping("/list") public TableDataInfo list(SmsbItemPushDeviceBo bo, PageQuery pageQuery) { return smsbItemPushDeviceService.queryPageList(bo, pageQuery); } *//** * 导出内容发布设备列表 *//* @Log(title = "内容发布设备", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(SmsbItemPushDeviceBo bo, HttpServletResponse response) { List list = smsbItemPushDeviceService.queryList(bo); ExcelUtil.exportExcel(list, "内容发布设备", SmsbItemPushDeviceVo.class, response); } *//** * 获取内容发布设备详细信息 * * @param id 主键 *//* @GetMapping("/{id}") public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { return R.ok(smsbItemPushDeviceService.queryById(id)); } *//** * 新增内容发布设备 *//* @Log(title = "内容发布设备", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() public R add(@Validated(AddGroup.class) @RequestBody SmsbItemPushDeviceBo bo) { return toAjax(smsbItemPushDeviceService.insertByBo(bo)); } *//** * 修改内容发布设备 *//* @Log(title = "内容发布设备", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() public R edit(@Validated(EditGroup.class) @RequestBody SmsbItemPushDeviceBo bo) { return toAjax(smsbItemPushDeviceService.updateByBo(bo)); } *//** * 删除内容发布设备 * * @param ids 主键串 *//* @Log(title = "内容发布设备", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) { return toAjax(smsbItemPushDeviceService.deleteWithValidByIds(List.of(ids), true)); } */ /** * 内容发布设备下架 * * @param bo */ @Log(title = "内容发布下架", businessType = BusinessType.DELETE) @DeleteMapping("/remove") public R pushRemoveDevice(@RequestBody SmsbItemPushDeviceBo bo) { return smsbItemPushDeviceService.pushRemoveDevice(bo); } }