| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- 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<List<SmsbItemPushPlaylistVo>> getPushDevicelist(SmsbItemPushPlaylistBo bo) {
- return R.ok(smsbItemPushDeviceService.getPushDeviceList(bo));
- }
- /**
- * 查询内容发布设备列表
- *//*
- @GetMapping("/list")
- public TableDataInfo<SmsbItemPushDeviceVo> 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<SmsbItemPushDeviceVo> list = smsbItemPushDeviceService.queryList(bo);
- ExcelUtil.exportExcel(list, "内容发布设备", SmsbItemPushDeviceVo.class, response);
- }
- *//**
- * 获取内容发布设备详细信息
- *
- * @param id 主键
- *//*
- @GetMapping("/{id}")
- public R<SmsbItemPushDeviceVo> getInfo(@NotNull(message = "主键不能为空")
- @PathVariable Long id) {
- return R.ok(smsbItemPushDeviceService.queryById(id));
- }
- *//**
- * 新增内容发布设备
- *//*
- @Log(title = "内容发布设备", businessType = BusinessType.INSERT)
- @RepeatSubmit()
- @PostMapping()
- public R<Void> add(@Validated(AddGroup.class) @RequestBody SmsbItemPushDeviceBo bo) {
- return toAjax(smsbItemPushDeviceService.insertByBo(bo));
- }
- *//**
- * 修改内容发布设备
- *//*
- @Log(title = "内容发布设备", businessType = BusinessType.UPDATE)
- @RepeatSubmit()
- @PutMapping()
- public R<Void> edit(@Validated(EditGroup.class) @RequestBody SmsbItemPushDeviceBo bo) {
- return toAjax(smsbItemPushDeviceService.updateByBo(bo));
- }
- *//**
- * 删除内容发布设备
- *
- * @param ids 主键串
- *//*
- @Log(title = "内容发布设备", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public R<Void> 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<Void> pushRemoveDevice(@RequestBody SmsbItemPushDeviceBo bo) {
- return smsbItemPushDeviceService.pushRemoveDevice(bo);
- }
- }
|