diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index fc3c5948e..228f07977 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -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 + } + } } + } }