- 处理在修改美团分类名,但分类已不存在的情况

This commit is contained in:
gazebo
2019-09-18 15:04:24 +08:00
parent a2e71189db
commit 54e95857bd

View File

@@ -103,6 +103,11 @@ func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID in
if !(originName == catName && subCatName == "") { if !(originName == catName && subCatName == "") {
if globals.EnableMtwmStoreWrite { if globals.EnableMtwmStoreWrite {
err = api.MtwmAPI.RetailCatUpdate(vendorStoreID, originName, catName, subCatName, storeCat.Seq) err = api.MtwmAPI.RetailCatUpdate(vendorStoreID, originName, catName, subCatName, storeCat.Seq)
if storeCat.StoreCatSyncStatus&model.SyncFlagNewMask == 0 && // 修改分类名,但分类不存在
p.IsErrCategoryNotExist(err) && originName != "" {
storeCat.StoreCatSyncStatus |= model.SyncFlagNewMask
err = p.CreateStoreCategory(ctx, storeID, vendorStoreID, storeCat)
}
} }
} }
if err == nil { if err == nil {