Accept Merge Request #219: (qidongsheng -> jdshop)
Merge Request: 新增新版匹配规则 Created By: @漆东升 Accepted By: @苏尹岚 URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/219
This commit is contained in:
@@ -731,10 +731,24 @@ func IsSensitiveWordInList(str string) (bool, string) {
|
||||
if err == nil {
|
||||
for _, value := range wordList {
|
||||
keyWord := value.Word
|
||||
checkHas := strings.Contains(keyWord, str)
|
||||
if checkHas {
|
||||
return true, str
|
||||
if value.VendorID != -2 {
|
||||
checkHas := strings.Contains(str, keyWord)
|
||||
if checkHas {
|
||||
return true, keyWord
|
||||
}
|
||||
} else {
|
||||
var index int
|
||||
for index > 0 {
|
||||
index = strings.Index(keyWord, ",")
|
||||
keyWord = keyWord[:index-1]
|
||||
globals.SugarLogger.Debug("keyWord", keyWord)
|
||||
checkHas := strings.Contains(str, keyWord)
|
||||
if checkHas {
|
||||
return true, keyWord
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user