敏感词银豹
This commit is contained in:
@@ -2,6 +2,7 @@ package yb
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"
|
"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
@@ -16,6 +17,10 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
sensitiveWordRegexp = regexp.MustCompile(`商品名称中含有敏感词(\[.*\])`)
|
||||||
|
)
|
||||||
|
|
||||||
func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
if globals.EnableYbStoreWrite {
|
if globals.EnableYbStoreWrite {
|
||||||
storeSku := storeSkuList[0]
|
storeSku := storeSkuList[0]
|
||||||
@@ -223,6 +228,10 @@ func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetSensitiveWordRegexp() *regexp.Regexp {
|
||||||
|
return sensitiveWordRegexp
|
||||||
|
}
|
||||||
|
|
||||||
func ybSkuStatus2Jx(ybStatus int) (jxSkuStatus int) {
|
func ybSkuStatus2Jx(ybStatus int) (jxSkuStatus int) {
|
||||||
if ybStatus == yinbaoapi.SkuStatusEnable {
|
if ybStatus == yinbaoapi.SkuStatusEnable {
|
||||||
jxSkuStatus = model.SkuStatusNormal
|
jxSkuStatus = model.SkuStatusNormal
|
||||||
|
|||||||
Reference in New Issue
Block a user