- 处理在修改美团分类名,但分类已不存在的情况
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user