1
This commit is contained in:
@@ -554,12 +554,9 @@ func (v *VendorSync) SyncStoresSkus(ctx *jxcontext.Context, parentTask tasksch.I
|
||||
|
||||
//执行比较店铺与运营商的sku差异
|
||||
func (c *ComparePlatform) CompareStoreWithOperator(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs []int, storeIDs []int, syncDisabled bool, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debug("开始执行CompareStoreWithOperator")
|
||||
return hint, makeSyncError(err)
|
||||
}
|
||||
|
||||
func (v *VendorSync) FullSyncStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs []int, storeIDs []int, syncDisabled bool, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debug("FullSyncStoresSkus")
|
||||
hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("初始化门店商品信息:%v", storeIDs), isAsync, true, vendorIDs, storeIDs,
|
||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
@@ -588,7 +585,6 @@ func (v *VendorSync) FullSyncStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, v
|
||||
}
|
||||
|
||||
func (v *VendorSync) DeleteRemoteStoreSkus(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs []int, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debug("DeleteRemoteStoreSkus")
|
||||
hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("删除远程门店商品信息:%v", storeIDs), isAsync, true, vendorIDs, storeIDs,
|
||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
@@ -688,7 +684,6 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I
|
||||
if storeMapList, err = dao.GetStoresMapList2(db, vendorIDs, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", "", "", mustDirty); err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
globals.SugarLogger.Debug("===============len(storeMapList)", len(storeMapList))
|
||||
if len(storeMapList) == 0 {
|
||||
return nil, "", nil
|
||||
}
|
||||
@@ -705,13 +700,10 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I
|
||||
}
|
||||
index++
|
||||
}
|
||||
globals.SugarLogger.Debug("===============len(storeMapList)1111111111", vendorStoreMap)
|
||||
|
||||
if len(loopInfoList) == 1 {
|
||||
globals.SugarLogger.Debug("===============len(storeMapList)22222")
|
||||
taskName = fmt.Sprintf("%s,处理平台%s", taskName, model.VendorChineseNames[loopInfoList[0].VendorID])
|
||||
}
|
||||
globals.SugarLogger.Debug("===============len(storeMapList)3333")
|
||||
|
||||
task = tasksch.NewParallelTask(taskName, tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, handler, loopInfoList)
|
||||
if isAsync {
|
||||
|
||||
Reference in New Issue
Block a user