- mtwm.SyncLocalStoreCategory中,如果发现store_sku_category_map有记录,但还没有同步,要计算num

This commit is contained in:
gazebo
2019-04-16 19:39:37 +08:00
parent ba3872327a
commit ab6e30d630

View File

@@ -173,7 +173,11 @@ func (p *PurchaseHandler) SyncLocalStoreCategory(ctx *jxcontext.Context, db *dao
if err = dao.CreateEntity(db, catMap); err != nil {
return "", err
}
} else if isCheckRemote {
} else {
if v.VendorCatID == "" || v.VendorCatID == "0" {
num++
}
if isCheckRemote {
catMap := &model.StoreSkuCategoryMap{
MtwmSyncStatus: model.SyncFlagNewMask,
}
@@ -196,6 +200,7 @@ func (p *PurchaseHandler) SyncLocalStoreCategory(ctx *jxcontext.Context, db *dao
}
}
}
}
dao.Commit(db)
return utils.Int2Str(num), err
}
@@ -219,7 +224,7 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
if hint, err = p.SyncLocalStoreCategory(ctx, db, storeID, false, skuIDs); err != nil {
return "", err
}
if true { //hint != "0" {
if hint != "0" {
if hint, err = p.SyncStoreCategory(ctx, parentTask, storeID, false); err != nil {
return "", err
}