- 避免在美团分类别没有实际变化时修改报错

This commit is contained in:
gazebo
2019-08-07 10:04:42 +08:00
parent b1209a954b
commit 638d851872

View File

@@ -94,8 +94,10 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
panic("catName is empty")
}
globals.SugarLogger.Debugf("mtwm CreateStoreCategory vendorStoreID:%s, originName:%s, catName:%s, subCatName:%s, seq:%d", vendorStoreID, originName, catName, subCatName, storeCat.Seq)
if globals.EnableMtwmStoreWrite {
err = api.MtwmAPI.RetailCatUpdate(vendorStoreID, originName, catName, subCatName, storeCat.Seq)
if !(originName == catName && subCatName == "") {
if globals.EnableMtwmStoreWrite {
err = api.MtwmAPI.RetailCatUpdate(vendorStoreID, originName, catName, subCatName, storeCat.Seq)
}
}
if err == nil {
storeCat.VendorCatID = storeCat.Name