diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 5c768413c..222ae9038 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1265,7 +1265,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in if model.IsOrderFinalStatus(order.Status) { goodsOrder.Status = order.Status goodsOrder.OrderFinishedAt = order.OrderFinishedAt - if goodsOrder.OrderFinishedAt == utils.DefaultTimeValue { + if goodsOrder.OrderFinishedAt == utils.DefaultTimeValue || goodsOrder.OrderFinishedAt == utils.ZeroTimeValue { goodsOrder.OrderFinishedAt = goodsOrder.OrderCreatedAt.Add(time.Hour) } _, err = dao.UpdateEntity(db, goodsOrder, "Status", "OrderFinishedAt") diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index c0ce00012..c337c2128 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -188,6 +188,11 @@ func Init() { report.RefreshStoreManageState(jxcontext.AdminCtx) }, 5*time.Second, 20*time.Minute) + ScheduleTimerFuncByInterval(func() { + curDate := utils.Time2Date(time.Now()) + orderman.FixedOrderManager.AmendMissingOrders(jxcontext.AdminCtx, []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI}, 0, curDate, curDate, true, true) + }, 5*time.Second, 10*time.Minute) + ScheduleTimerFunc("auto enable remote store", func() { cms.EnableHaveRestStores(jxcontext.AdminCtx, false, true) // cms.OpenRemoteStoreByJxStatus(jxcontext.AdminCtx, nil, nil, false, false, true)