美团外卖分类名不支持emoji表情了

This commit is contained in:
gazebo
2019-10-15 17:02:31 +08:00
parent 5bbbaf80d8
commit 9fa29c18a2

View File

@@ -100,6 +100,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)
subCatName = utils.FilterMb4(subCatName)
globals.SugarLogger.Debugf("mtwm CreateStoreCategory vendorStoreID:%s, originName:%s, catName:%s, subCatName:%s, seq:%d", vendorStoreID, originName, catName, subCatName, storeCat.Seq) globals.SugarLogger.Debugf("mtwm CreateStoreCategory vendorStoreID:%s, originName:%s, catName:%s, subCatName:%s, seq:%d", vendorStoreID, originName, catName, subCatName, storeCat.Seq)
if !(originName == catName && subCatName == "") { if !(originName == catName && subCatName == "") {
if globals.EnableMtwmStoreWrite { if globals.EnableMtwmStoreWrite {
@@ -112,7 +114,7 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
} }
} }
if err == nil { if err == nil {
storeCat.VendorCatID = storeCat.Name storeCat.VendorCatID = utils.FilterMb4(storeCat.Name)
} }
return err return err
} }