mitao
2024-06-13 d222f1d7baaf195a65dfdfe9bc8f38adcde20b52
ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/management/MgtSensitiveWordsController.java
@@ -9,8 +9,11 @@
import com.ruoyi.common.core.utils.page.PageDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -56,4 +59,17 @@
        sensitiveWordsService.saveSensitiveWords(dto);
        return R.ok();
    }
    /**
     * 上传敏感词
     *
     * @param id 敏感词id
     */
    @ApiOperation("删除敏感词")
    @DeleteMapping("/{id}")
    public R<?> delSensitiveWords(
            @ApiParam(name = "id", value = "敏感词id", required = true) @PathVariable("id") Long id) {
        sensitiveWordsService.removeById(id);
        return R.ok();
    }
}