潘志宝
2024-10-15 7cbee82d2572041332eb69bc2d0d9c6a93492efe
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java
@@ -8,6 +8,7 @@
import com.iailab.module.data.channel.kio.vo.KioTagPageReqVO;
import com.iailab.module.data.channel.kio.vo.KioTagRespVO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -29,12 +30,14 @@
    /**
     * 分页查询tag
     * */
    @PreAuthorize("@ss.hasPermission('data:channel-kio:query')")
    @GetMapping("page")
    public CommonResult<PageResult<KioTagRespVO>> page(@Valid KioTagPageReqVO reqVO){
        PageResult<ChannelKioTagEntity> page = channelKioTagService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, KioTagRespVO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:query')")
    @GetMapping("/info/{id}")
    @Operation(summary = "信息")
    public CommonResult<ChannelKioTagEntity> info(@PathVariable("id") String id) {
@@ -42,8 +45,9 @@
        return success(info);
    }
    @PostMapping("/add")
    public CommonResult<Boolean> add(@RequestBody ChannelKioTagEntity channelKioTagEntity) {
    @PreAuthorize("@ss.hasPermission('data:channel-kio:create')")
    @PostMapping("/create")
    public CommonResult<Boolean> create(@RequestBody ChannelKioTagEntity channelKioTagEntity) {
        String id = UUID.randomUUID().toString();
        channelKioTagEntity.setId(id);
        channelKioTagEntity.setCreateTime(new Date());
@@ -51,6 +55,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:update')")
    @PutMapping("/update")
    public CommonResult<Boolean> update(@RequestBody ChannelKioTagEntity channelKioTagEntity) {
        channelKioTagEntity.setUpdateTime(new Date());
@@ -58,6 +63,7 @@
        return success(true);
    }
    @PreAuthorize("@ss.hasPermission('data:channel-kio:delete')")
    @DeleteMapping("/delete")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        channelKioTagService.delete(id);