diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 89ec5dfa9..65edfced8 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -2225,27 +2225,17 @@ func UpdateStoreName() error { } globals.SugarLogger.Debugf("====================len : %d", len(courierList)) - work := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { - storeCourier := batchItemList[0].(*model.StoreCourierMap) - globals.SugarLogger.Debugf("====================storeId : %d", storeCourier.StoreID) - errList := errlist.New() - db := dao.GetDB() - - storeDetail, _ := dao.GetStoreDetail2(db, storeCourier.StoreID, storeCourier.VendorStoreID, storeCourier.VendorID) + for i := 0; i < len(courierList); i++ { + storeDetail, _ := dao.GetStoreDetail2(db, courierList[i].StoreID, courierList[i].VendorStoreID, courierList[i].VendorID) formalizeStore4Courier(storeDetail) if handlerInfo := partner.GetDeliveryPlatformFromVendorID(storeDetail.VendorID); handlerInfo != nil { if updateHandler, _ := handlerInfo.Handler.(partner.IDeliveryUpdateStoreHandler); updateHandler != nil { if err := updateHandler.UpdateStoreName(storeDetail.VendorStoreID, storeDetail.Name); err != nil { - errList.AddErr(err) globals.SugarLogger.Debugf("err := %v,storeID : %s,storeName :%s , vendorId : %d", err, storeDetail.VendorStoreID, storeDetail.Name, storeDetail.VendorID) } } } - return nil, errList.GetErrListAsOne() } - // 定时任务更新或者创建时修改东西 - task := tasksch.NewParallelTask("UpdateStoreName", tasksch.NewParallelConfig().SetIsContinueWhenError(false), jxcontext.AdminCtx, work, courierList) - tasksch.HandleTask(task, nil, len(courierList) > 1).Run() return nil } diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 5d2ca5622..b9b013f24 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -231,7 +231,7 @@ func Init() { ScheduleTimerFunc("UpdateStoreName ", func() { cms.UpdateStoreName() }, []string{ - "17:20:00", + "17:35:00", }) // 定时任务更新昨天的都要商品和本地商品id的映射关系