修改敏感词过滤代码结构

This commit is contained in:
Rosy-zhudan
2019-08-19 10:27:04 +08:00
parent 9425f3c07a
commit dee9eea64a
9 changed files with 39 additions and 38 deletions

View File

@@ -138,7 +138,7 @@ type ISingleStoreStoreSkuHandler interface {
IsErrCategoryExist(err error) (isExist bool)
IsErrCategoryNotExist(err error) (isNotExist bool)
GetRegexp() *regexp.Regexp
GetSensitiveWordRegexp() *regexp.Regexp
}
func BuildSkuName(skuID int, vendorSkuID string) (skuName *SkuNameInfo) {

View File

@@ -388,6 +388,6 @@ func vendorSkuList2Jx(vendorSkuList []*ebaiapi.SkuInfo) (skuNameList []*partner.
return skuNameList
}
func (p *PurchaseHandler) GetRegexp() *regexp.Regexp {
func (p *PurchaseHandler) GetSensitiveWordRegexp() *regexp.Regexp {
return regexp.MustCompile(`商品名称中含有敏感词(\[.*\])`)
}

View File

@@ -367,6 +367,6 @@ func vendorSkuList2Jx(appFoodList []*mtwmapi.AppFood) (skuNameList []*partner.Sk
return skuNameList
}
func (p *PurchaseHandler) GetRegexp() *regexp.Regexp {
func (p *PurchaseHandler) GetSensitiveWordRegexp() *regexp.Regexp {
return regexp.MustCompile(`包含敏感词:(\[.*\])`)
}