From a63d088f16fa57cd0625b76099ead699597990f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 9 Mar 2023 18:06:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=96=E9=9F=B3=E5=88=B7?= =?UTF-8?q?=E5=8D=95=E9=87=8D=E5=A4=8D=E6=8B=A3=E8=B4=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/auto_delivery/auto_delivery.go | 12 +++++++----- business/jxstore/cms/sync_store_sku.go | 14 -------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/business/jxcallback/auto_delivery/auto_delivery.go b/business/jxcallback/auto_delivery/auto_delivery.go index 0a181947a..f53113b4b 100644 --- a/business/jxcallback/auto_delivery/auto_delivery.go +++ b/business/jxcallback/auto_delivery/auto_delivery.go @@ -132,11 +132,13 @@ func AutoSettingFakeDelivery() { } // 自动拣货 - handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID) - flag := model.IsOrderDeliveryByStore(v) || model.IsOrderDeliveryBySelf(v) - if err := handler.PickupGoods(v, flag, jxcontext.AdminCtx.GetUserName()); err != nil { - globals.SugarLogger.Errorf("自动拣货错误:[%v]", err) - break + if v.Status < model.OrderStatusFinishedPickup { // 未拣货 + handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID) + flag := model.IsOrderDeliveryByStore(v) || model.IsOrderDeliveryBySelf(v) + if err := handler.PickupGoods(v, flag, jxcontext.AdminCtx.GetUserName()); err != nil { + globals.SugarLogger.Errorf("自动拣货错误:[%v]", err) + break + } } //自动发单 if len(riderListInfo[riderKey]) == 0 { diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index f4495b6cf..6c730e524 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -474,8 +474,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } else { skus, err = dao.GetStoreSkus(db, vendorID, storeID, skuIDs) } - - globals.SugarLogger.Debugf("======sku:= %s", utils.Format4Output(skus, false)) if err != nil || len(skus) == 0 { return err } @@ -699,18 +697,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag // } } - if storeID == 668815 { - 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, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int)