|
@@ -0,0 +1,103 @@
|
|
|
+package com.fs.live.controller;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.fs.common.annotation.Log;
|
|
|
+import com.fs.common.core.controller.BaseController;
|
|
|
+import com.fs.common.core.domain.AjaxResult;
|
|
|
+import com.fs.common.enums.BusinessType;
|
|
|
+import com.fs.live.domain.LiveSensitiveWords;
|
|
|
+import com.fs.live.service.ILiveSensitiveWordsService;
|
|
|
+import com.fs.common.utils.poi.ExcelUtil;
|
|
|
+import com.fs.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 直播间敏感词过滤Controller
|
|
|
+ *
|
|
|
+ * @author fs
|
|
|
+ * @date 2025-07-08
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/live/words")
|
|
|
+public class LiveSensitiveWordsController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private ILiveSensitiveWordsService liveSensitiveWordsService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询直播间敏感词过滤列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:words:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(LiveSensitiveWords liveSensitiveWords)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<LiveSensitiveWords> list = liveSensitiveWordsService.selectLiveSensitiveWordsList(liveSensitiveWords);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出直播间敏感词过滤列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:words:export')")
|
|
|
+ @Log(title = "直播间敏感词过滤", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult export(LiveSensitiveWords liveSensitiveWords)
|
|
|
+ {
|
|
|
+ List<LiveSensitiveWords> list = liveSensitiveWordsService.selectLiveSensitiveWordsList(liveSensitiveWords);
|
|
|
+ ExcelUtil<LiveSensitiveWords> util = new ExcelUtil<LiveSensitiveWords>(LiveSensitiveWords.class);
|
|
|
+ return util.exportExcel(list, "直播间敏感词过滤数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取直播间敏感词过滤详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:words:query')")
|
|
|
+ @GetMapping(value = "/{wordId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("wordId") Long wordId)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(liveSensitiveWordsService.selectLiveSensitiveWordsByWordId(wordId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增直播间敏感词过滤
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:words:add')")
|
|
|
+ @Log(title = "直播间敏感词过滤", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody LiveSensitiveWords liveSensitiveWords)
|
|
|
+ {
|
|
|
+ return toAjax(liveSensitiveWordsService.insertLiveSensitiveWords(liveSensitiveWords));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改直播间敏感词过滤
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:words:edit')")
|
|
|
+ @Log(title = "直播间敏感词过滤", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody LiveSensitiveWords liveSensitiveWords)
|
|
|
+ {
|
|
|
+ return toAjax(liveSensitiveWordsService.updateLiveSensitiveWords(liveSensitiveWords));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除直播间敏感词过滤
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:words:remove')")
|
|
|
+ @Log(title = "直播间敏感词过滤", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{wordIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] wordIds)
|
|
|
+ {
|
|
|
+ return toAjax(liveSensitiveWordsService.deleteLiveSensitiveWordsByWordIds(wordIds));
|
|
|
+ }
|
|
|
+}
|