本地忽略敏感字服务器

back_recharge
duhui 2022-09-06 16:56:11 +08:00
parent c24fe5768c
commit fa8b30a0ad
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package com.ljsd.jieling.util;
import com.ljsd.GameApplication;
import com.ljsd.jieling.db.redis.RedisUtil;
import com.ljsd.jieling.exception.ErrorCode;
import com.ljsd.jieling.exception.ErrorCodeException;
@ -43,10 +44,13 @@ public class SensitivewordFilter {
*
* @param txt
* @param matchType  12
* @return
* @return
* @version 1.0
*/
private static Set<String> getSensitiveWord(String txt, int matchType) {
if (GameApplication.serverProperties.isDebug()){
return new HashSet<>();
}
Object o = RedisUtil.getInstence().get(SENSIT_WORD_FILTER_KEY);
if (o == null) {
LOGGER.info("getSensitiveWord 敏感字检测服未开启");
@ -115,11 +119,15 @@ public class SensitivewordFilter {
}
/**
* <br>
*
* truefalse
* @return0
* @version 1.0
*/
private static boolean isContaintSensitiveWordThrift(String userName, int type) throws ErrorCodeException {
if (GameApplication.serverProperties.isDebug()){
return false;
}
Object o = RedisUtil.getInstence().get(SENSIT_WORD_FILTER_KEY);
if (o == null) {
LOGGER.error("getSensitiveWord 敏感字检测服未开启");

View File

@ -1,6 +1,5 @@
package com.ljsd.jieling.util;
import com.ljsd.jieling.chat.logic.ChatLogic;
import com.ljsd.jieling.dataReport.reportBeans_37.ChatContentType;
import com.ljsd.jieling.logic.dao.root.User;
import org.slf4j.Logger;