liusheng
2023-12-15 78b0e909aa6ece787091e5d81450c8927ef2599e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java
@@ -4,6 +4,7 @@
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;
@@ -32,7 +33,7 @@
 * @author ruoyi
 * @date 2023-06-06
 */
@Api("标签")
@Api(description = "标签")
@RestController
@RequestMapping("/base/tag")
public class BaseTagController extends BaseController {
@@ -44,9 +45,10 @@
     */
    @ApiOperation("查询标签列表")
    @PreAuthorize("@ss.hasPermi('system:tag:list')")
    @GetMapping("/list")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody BaseTag baseTag) {
        startPage();
        PageUtils.startPageByPost(baseTag.getPageNum(), baseTag.getPageSize());
        if (baseTag.getTagcategoryid() == 0) baseTag.setTagcategoryid(null);
        List<BaseTag> list = baseTagService.selectBaseTagList(baseTag);
        return getDataTable(list);
    }
@@ -81,7 +83,7 @@
    @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));
    }
@@ -92,7 +94,7 @@
    @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));
    }
@@ -104,7 +106,7 @@
    @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));
    }