liusheng
2023-12-04 cde16e4d86afb08896a8eeaea8f22cf6f5a94aa5
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(description = "标签")
@RestController
@RequestMapping("/base/tag")
public class BaseTagController extends BaseController {
@@ -37,8 +42,9 @@
    /**
     * 查询标签列表
     */
    @ApiOperation("查询标签列表")
    @PreAuthorize("@ss.hasPermi('system:tag:list')")
    @GetMapping("/list")
    @PostMapping("/list")
    public TableDataInfo list(BaseTag baseTag) {
        startPage();
        List<BaseTag> list = baseTagService.selectBaseTagList(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,10 +100,14 @@
    /**
     * 删除标签
     */
    @ApiOperation("删除标签")
    @ApiImplicitParam(name = "remove", value = "主键ID", dataType = "long", dataTypeClass = Array.class)
    @PreAuthorize("@ss.hasPermi('system:tag:remove')")
    @Log(title = "标签", businessType = BusinessType.DELETE)
    @DeleteMapping("/{tagids}")
    public AjaxResult remove(@PathVariable Long[] tagids) {
        return toAjax(baseTagService.deleteBaseTagByTagids(tagids));
    }
}