From 19bbb04fe271943850e5b0cdba1aaeed633bc83f Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 08 六月 2023 16:25:08 +0800 Subject: [PATCH] 添加swagger --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 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..9081ab8 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,14 @@ package com.ruoyi.web.controller.smartor; +import java.lang.reflect.Array; import java.util.List; import javax.servlet.http.HttpServletResponse; 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 +32,7 @@ * @author ruoyi * @date 2023-06-06 */ +@Api("鏍囩") @RestController @RequestMapping("/base/tag") public class BaseTagController extends BaseController { @@ -37,6 +42,7 @@ /** * 鏌ヨ鏍囩鍒楄〃 */ + @ApiOperation("鏌ヨ鏍囩鍒楄〃") @PreAuthorize("@ss.hasPermi('system:tag:list')") @GetMapping("/list") public TableDataInfo list(BaseTag baseTag) { @@ -48,6 +54,7 @@ /** * 瀵煎嚭鏍囩鍒楄〃 */ + @ApiOperation("瀵煎嚭鏍囩鍒楄〃") @PreAuthorize("@ss.hasPermi('system:tag:export')") @Log(title = "鏍囩", businessType = BusinessType.EXPORT) @PostMapping("/export") @@ -60,6 +67,8 @@ /** * 鑾峰彇鏍囩璇︾粏淇℃伅 */ + @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) { @@ -69,6 +78,7 @@ /** * 鏂板鏍囩 */ + @ApiOperation("鏂板鏍囩") @PreAuthorize("@ss.hasPermi('system:tag:add')") @Log(title = "鏍囩", businessType = BusinessType.INSERT) @PostMapping @@ -79,6 +89,7 @@ /** * 淇敼鏍囩 */ + @ApiOperation("淇敼鏍囩") @PreAuthorize("@ss.hasPermi('system:tag:edit')") @Log(title = "鏍囩", businessType = BusinessType.UPDATE) @PutMapping @@ -89,6 +100,8 @@ /** * 鍒犻櫎鏍囩 */ + @ApiOperation("鍒犻櫎鏍囩") + @ApiImplicitParam(name = "remove", value = "涓婚敭ID", dataType = "long", dataTypeClass = Array.class) @PreAuthorize("@ss.hasPermi('system:tag:remove')") @Log(title = "鏍囩", businessType = BusinessType.DELETE) @DeleteMapping("/{tagids}") -- Gitblit v1.9.3