aa
This commit is contained in:
@@ -1265,7 +1265,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in
|
|||||||
if model.IsOrderFinalStatus(order.Status) {
|
if model.IsOrderFinalStatus(order.Status) {
|
||||||
goodsOrder.Status = order.Status
|
goodsOrder.Status = order.Status
|
||||||
goodsOrder.OrderFinishedAt = order.OrderFinishedAt
|
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)
|
goodsOrder.OrderFinishedAt = goodsOrder.OrderCreatedAt.Add(time.Hour)
|
||||||
}
|
}
|
||||||
_, err = dao.UpdateEntity(db, goodsOrder, "Status", "OrderFinishedAt")
|
_, err = dao.UpdateEntity(db, goodsOrder, "Status", "OrderFinishedAt")
|
||||||
|
|||||||
@@ -188,6 +188,11 @@ func Init() {
|
|||||||
report.RefreshStoreManageState(jxcontext.AdminCtx)
|
report.RefreshStoreManageState(jxcontext.AdminCtx)
|
||||||
}, 5*time.Second, 20*time.Minute)
|
}, 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() {
|
ScheduleTimerFunc("auto enable remote store", func() {
|
||||||
cms.EnableHaveRestStores(jxcontext.AdminCtx, false, true)
|
cms.EnableHaveRestStores(jxcontext.AdminCtx, false, true)
|
||||||
// cms.OpenRemoteStoreByJxStatus(jxcontext.AdminCtx, nil, nil, false, false, true)
|
// cms.OpenRemoteStoreByJxStatus(jxcontext.AdminCtx, nil, nil, false, false, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user