派生自 projectDept/qhighschool

胡仁荣
2023-04-12 3220d856699b2adc93ee528eee78d49409f22fd7
src/main/java/com/qxueyou/scc/operation/topic/action/StuTopicController.java
@@ -1,6 +1,7 @@
package com.qxueyou.scc.operation.topic.action;
import com.qxueyou.scc.Sensitive.SensitiveWordFilter;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -354,7 +355,9 @@
   @GetMapping(value = "addComment")
   public Result addComment(String content, String commentObjectId, String commentParentId, String commentedId,
         String commentedName) {
      return topicService.addComment(content, commentObjectId, commentParentId, commentedId, commentedName);
      SensitiveWordFilter.loadWordFromFile("D:\\工作\\SensitiveWord\\SensitiveWordList.txt");
      String filter = SensitiveWordFilter.Filter(content);
      return topicService.addComment(filter, commentObjectId, commentParentId, commentedId, commentedName);
   }
   /**