From 7cbee82d2572041332eb69bc2d0d9c6a93492efe Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 15 十月 2024 11:52:48 +0800
Subject: [PATCH] HttpCollectorIhDB

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java
index 2073532..6122d90 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java
+++ b/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;
@@ -18,9 +19,7 @@
 import static com.iailab.framework.common.pojo.CommonResult.success;
 
 /**
- * @author lirm
- * @Description
- * @createTime 2024年08月26日
+
  */
 @RestController
 @RequestMapping("/data/channel/kio/tag")
@@ -31,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) {
@@ -44,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());
@@ -53,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());
@@ -60,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);

--
Gitblit v1.9.3