美团外卖分类名,商品名,完全过滤掉emoji
This commit is contained in:
@@ -310,7 +310,7 @@ func jxCatSeq2Ebai(seq int) int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func formatCatName(name string) string {
|
func formatCatName(name string) string {
|
||||||
return name //utils.TrimBlankChar(utils.FilterMb4(name))
|
return name
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (skuNameList []*partner.SkuNameInfo, err error) {
|
func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (skuNameList []*partner.SkuNameInfo, err error) {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
|
|||||||
}
|
}
|
||||||
if level == 2 { // 二级分类
|
if level == 2 { // 二级分类
|
||||||
// 创建二级分类
|
// 创建二级分类
|
||||||
originName = utils.FilterMb4(storeCat.ParentCatName)
|
originName = utils.FilterEmoji(storeCat.ParentCatName)
|
||||||
catName = storeCat.ParentCatName
|
catName = storeCat.ParentCatName
|
||||||
catCode = storeCat.ParentID
|
catCode = storeCat.ParentID
|
||||||
subCatName = storeCat.Name
|
subCatName = storeCat.Name
|
||||||
@@ -127,8 +127,8 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
|
|||||||
if catName == "" {
|
if catName == "" {
|
||||||
panic("catName is empty")
|
panic("catName is empty")
|
||||||
}
|
}
|
||||||
catName = utils.FilterMb4(catName)
|
catName = utils.FilterEmoji(catName)
|
||||||
subCatName = utils.FilterMb4(subCatName)
|
subCatName = utils.FilterEmoji(subCatName)
|
||||||
globals.SugarLogger.Debugf("mtwm CreateStoreCategory vendorStoreID:%s, originName:%s, catCode:%d, catName:%s, subCatCode:%d, subCatName:%s, seq:%d",
|
globals.SugarLogger.Debugf("mtwm CreateStoreCategory vendorStoreID:%s, originName:%s, catCode:%d, catName:%s, subCatCode:%d, subCatName:%s, seq:%d",
|
||||||
vendorStoreID, originName, catCode, catName, subCatCode, subCatName, storeCat.Seq)
|
vendorStoreID, originName, catCode, catName, subCatCode, subCatName, storeCat.Seq)
|
||||||
if !(originName == catName && subCatName == "") {
|
if !(originName == catName && subCatName == "") {
|
||||||
@@ -143,7 +143,7 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// storeCat.VendorCatID = utils.FilterMb4(storeCat.Name)
|
// storeCat.VendorCatID = utils.FilterEmoji(storeCat.Name)
|
||||||
storeCat.VendorCatID = utils.Int2Str(storeCat.ID)
|
storeCat.VendorCatID = utils.Int2Str(storeCat.ID)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
@@ -195,7 +195,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
foodData["skus"] = skus
|
foodData["skus"] = skus
|
||||||
foodData["name"] = utils.LimitUTF8StringLen(storeSku.SkuName, mtwmapi.MaxSkuNameCharCount)
|
foodData["name"] = utils.LimitUTF8StringLen(utils.FilterEmoji(storeSku.SkuName), mtwmapi.MaxSkuNameCharCount)
|
||||||
foodData["description"] = storeSku.Comment
|
foodData["description"] = storeSku.Comment
|
||||||
if isNeedUpdatePrice {
|
if isNeedUpdatePrice {
|
||||||
foodData["price"] = jxutils.IntPrice2Standard(storeSku.VendorPrice)
|
foodData["price"] = jxutils.IntPrice2Standard(storeSku.VendorPrice)
|
||||||
|
|||||||
Reference in New Issue
Block a user