- GetStoreOrderAfterTime修改条件为小于OrderStatusEndBegin
This commit is contained in:
@@ -131,7 +131,7 @@ func (c *OrderManager) OnOrderAdjust(order *model.GoodsOrder, msgVendorStatus st
|
|||||||
msghub.OnNewOrder(order)
|
msghub.OnNewOrder(order)
|
||||||
// 因为订单调度器需要的是真实状态,所以用order的状态
|
// 因为订单调度器需要的是真实状态,所以用order的状态
|
||||||
_ = scheduler.CurrentScheduler.OnOrderNew(order, false)
|
_ = scheduler.CurrentScheduler.OnOrderNew(order, false)
|
||||||
_ = scheduler.CurrentScheduler.OnOrderStatusChanged(model.Order2Status(order), false)
|
_ = scheduler.CurrentScheduler.OnOrderStatusChanged(order, model.Order2Status(order), false)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
@@ -148,11 +148,11 @@ func (c *OrderManager) OnOrderStatusChanged(orderStatus *model.OrderStatus) (err
|
|||||||
panic(r)
|
panic(r)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
isDuplicated, _, err := c.addOrderStatus(orderStatus, db)
|
isDuplicated, order, err := c.addOrderStatus(orderStatus, db)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
if !isDuplicated {
|
if !isDuplicated {
|
||||||
_ = scheduler.CurrentScheduler.OnOrderStatusChanged(orderStatus, false)
|
_ = scheduler.CurrentScheduler.OnOrderStatusChanged(order, orderStatus, false)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ func GetStoreOrderAfterTime(db *DaoDB, storeID int, orderTime time.Time, lastOrd
|
|||||||
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at
|
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at
|
||||||
FROM goods_order t1
|
FROM goods_order t1
|
||||||
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id
|
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id
|
||||||
WHERE IF(t1.jx_store_id <> 0, t1.jx_store_id, t1.store_id) = ? AND t1.order_created_at >= ? AND t1.id > ? AND t1.status <= ?
|
WHERE IF(t1.jx_store_id <> 0, t1.jx_store_id, t1.store_id) = ? AND t1.order_created_at >= ? AND t1.id > ? AND t1.status < ?
|
||||||
ORDER BY t1.order_created_at DESC, t1.id DESC;
|
ORDER BY t1.order_created_at DESC, t1.id DESC;
|
||||||
`
|
`
|
||||||
sqlParams := []interface{}{
|
sqlParams := []interface{}{
|
||||||
storeID,
|
storeID,
|
||||||
orderTime,
|
orderTime,
|
||||||
lastOrderSeqID,
|
lastOrderSeqID,
|
||||||
model.OrderStatusDelivering,
|
model.OrderStatusEndBegin,
|
||||||
}
|
}
|
||||||
return orderList, GetRows(db, &orderList, sql, sqlParams...)
|
return orderList, GetRows(db, &orderList, sql, sqlParams...)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user