This commit is contained in:
邹宗楠
2024-07-24 10:36:20 +08:00
parent 7324598fd7
commit f09cc25e07
2 changed files with 2 additions and 16 deletions

View File

@@ -769,9 +769,6 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I
} }
vendorStoreMap := make(map[int][]*model.StoreMap) vendorStoreMap := make(map[int][]*model.StoreMap)
for _, v := range storeMapList { for _, v := range storeMapList {
if v.StoreID == 666900 {
globals.SugarLogger.Debugf("===========store:%d", v.VendorID)
}
vendorStoreMap[v.VendorID] = append(vendorStoreMap[v.VendorID], v) vendorStoreMap[v.VendorID] = append(vendorStoreMap[v.VendorID], v)
} }
loopInfoList := make([]*LoopStoreMapInfo, len(vendorStoreMap)) loopInfoList := make([]*LoopStoreMapInfo, len(vendorStoreMap))

View File

@@ -750,17 +750,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
} }
} }
if storeDetail.ID == 666900 {
globals.SugarLogger.Debugf("========createList := %s", utils.Format4Output(createList, false))
globals.SugarLogger.Debugf("========updateList := %s", utils.Format4Output(updateList, false))
globals.SugarLogger.Debugf("========deleteList := %s", utils.Format4Output(deleteList, false))
globals.SugarLogger.Debugf("========stockList := %s", utils.Format4Output(stockList, false))
globals.SugarLogger.Debugf("========onlineList := %s", utils.Format4Output(onlineList, false))
globals.SugarLogger.Debugf("========offlineList := %s", utils.Format4Output(offlineList, false))
globals.SugarLogger.Debugf("========priceList := %s", utils.Format4Output(priceList, false))
globals.SugarLogger.Debugf("========updateItems := %s", utils.Format4Output(updateItems, false))
globals.SugarLogger.Debugf("========reorderSkuMap := %s", utils.Format4Output(reorderSkuMap, false))
}
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx, task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
@@ -879,8 +868,8 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
if len(statusList) > 0 { if len(statusList) > 0 {
_, err = putils.FreeBatchStoreSkuInfo(name, func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) { _, err = putils.FreeBatchStoreSkuInfo(name, func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) {
var failedList []*partner.StoreSkuInfoWithErr var failedList []*partner.StoreSkuInfoWithErr
if storeDetail.ID == 666900 { if storeDetail.ID == 666900 && status == model.SkuStatusDontSale {
globals.SugarLogger.Debugf("========== %s ,%s, %s", storeDetail.VendorOrgCode, vendorStoreID, utils.Format4Output(batchedStoreSkuList, false)) globals.SugarLogger.Debugf("==========status :%d,VendorOrgCode: %s ,%s, %s", status, storeDetail.VendorOrgCode, vendorStoreID, utils.Format4Output(batchedStoreSkuList, false))
} }
failedList, err = storeSkuHandler.UpdateStoreSkusStatus(ctx, storeDetail.VendorOrgCode, storeID, vendorStoreID, batchedStoreSkuList, status) failedList, err = storeSkuHandler.UpdateStoreSkusStatus(ctx, storeDetail.VendorOrgCode, storeID, vendorStoreID, batchedStoreSkuList, status)
failedList, err = buildFailedListAndErr(failedList, err, batchedStoreSkuList, nil, storeID, vendorID, "更新门店商品状态") failedList, err = buildFailedListAndErr(failedList, err, batchedStoreSkuList, nil, storeID, vendorID, "更新门店商品状态")