From 907641e56c2085aaa81f267946dc3e3e9fca73e7 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 18 九月 2024 09:39:02 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java
index cfc29df..390ba15 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java
@@ -1,10 +1,15 @@
 package com.ruoyi.web.controller.smartor;
 
+import java.lang.reflect.Array;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.common.utils.PageUtils;
 import com.smartor.domain.BaseTag;
 import com.smartor.service.IBaseTagService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -28,6 +33,7 @@
  * @author ruoyi
  * @date 2023-06-06
  */
+@Api(description = "鏍囩")
 @RestController
 @RequestMapping("/base/tag")
 public class BaseTagController extends BaseController {
@@ -37,10 +43,12 @@
     /**
      * 鏌ヨ鏍囩鍒楄〃
      */
-    @PreAuthorize("@ss.hasPermi('system:tag:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(BaseTag baseTag) {
-        startPage();
+    @ApiOperation("鏌ヨ鏍囩鍒楄〃")
+    //@PreAuthorize("@ss.hasPermi('system:tag:list')")
+    @PostMapping("/list")
+    public TableDataInfo list(@RequestBody BaseTag baseTag) {
+        PageUtils.startPageByPost(baseTag.getPageNum(), baseTag.getPageSize());
+        if (baseTag.getTagcategoryid() == 0 || baseTag.getTagcategoryid() == null) baseTag.setTagcategoryid(null);
         List<BaseTag> list = baseTagService.selectBaseTagList(baseTag);
         return getDataTable(list);
     }
@@ -48,7 +56,8 @@
     /**
      * 瀵煎嚭鏍囩鍒楄〃
      */
-    @PreAuthorize("@ss.hasPermi('system:tag:export')")
+    @ApiOperation("瀵煎嚭鏍囩鍒楄〃")
+    //@PreAuthorize("@ss.hasPermi('system:tag:export')")
     @Log(title = "鏍囩", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, BaseTag baseTag) {
@@ -60,7 +69,9 @@
     /**
      * 鑾峰彇鏍囩璇︾粏淇℃伅
      */
-    @PreAuthorize("@ss.hasPermi('system:tag:query')")
+    @ApiOperation("鑾峰彇鏍囩璇︾粏淇℃伅")
+    @ApiImplicitParam(name = "remove", value = "涓婚敭ID", dataType = "long", dataTypeClass = Long.class)
+    //@PreAuthorize("@ss.hasPermi('system:tag:query')")
     @GetMapping(value = "/{tagid}")
     public AjaxResult getInfo(@PathVariable("tagid") Long tagid) {
         return success(baseTagService.selectBaseTagByTagid(tagid));
@@ -69,9 +80,10 @@
     /**
      * 鏂板鏍囩
      */
-    @PreAuthorize("@ss.hasPermi('system:tag:add')")
+    @ApiOperation("鏂板鏍囩")
+    //@PreAuthorize("@ss.hasPermi('system:tag:add')")
     @Log(title = "鏍囩", businessType = BusinessType.INSERT)
-    @PostMapping
+    @PostMapping("/add")
     public AjaxResult add(@RequestBody BaseTag baseTag) {
         return toAjax(baseTagService.insertBaseTag(baseTag));
     }
@@ -79,9 +91,10 @@
     /**
      * 淇敼鏍囩
      */
-    @PreAuthorize("@ss.hasPermi('system:tag:edit')")
+    @ApiOperation("淇敼鏍囩")
+    //@PreAuthorize("@ss.hasPermi('system:tag:edit')")
     @Log(title = "鏍囩", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/edit")
     public AjaxResult edit(@RequestBody BaseTag baseTag) {
         return toAjax(baseTagService.updateBaseTag(baseTag));
     }
@@ -89,10 +102,14 @@
     /**
      * 鍒犻櫎鏍囩
      */
-    @PreAuthorize("@ss.hasPermi('system:tag:remove')")
+    @ApiOperation("鍒犻櫎鏍囩")
+    @ApiImplicitParam(name = "remove", value = "涓婚敭ID", dataType = "long", dataTypeClass = Array.class)
+    //@PreAuthorize("@ss.hasPermi('system:tag:remove')")
     @Log(title = "鏍囩", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{tagids}")
+    @GetMapping("/remove/{tagids}")
     public AjaxResult remove(@PathVariable Long[] tagids) {
         return toAjax(baseTagService.deleteBaseTagByTagids(tagids));
     }
+
+
 }

--
Gitblit v1.9.3