- GetStoreOrderCountInfo排除掉LOCK了的订单
This commit is contained in:
@@ -76,10 +76,10 @@ func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID st
|
|||||||
SELECT t1.status, COUNT(*) count
|
SELECT t1.status, COUNT(*) count
|
||||||
FROM goods_order t1
|
FROM goods_order t1
|
||||||
WHERE t1.vendor_id <> 2 AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) = ?
|
WHERE t1.vendor_id <> 2 AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) = ?
|
||||||
AND t1.order_created_at >= ?
|
AND t1.order_created_at >= ? AND t1.lock_status = ?
|
||||||
GROUP BY 1
|
GROUP BY 1
|
||||||
ORDER BY 1
|
ORDER BY 1
|
||||||
`, model.VendorIDWSC, storeID, time.Now().Add(-time.Duration(lastHours)*time.Hour)).QueryRows(&countInfo)
|
`, model.VendorIDWSC, storeID, time.Now().Add(-time.Duration(lastHours)*time.Hour), model.OrderStatusUnknown).QueryRows(&countInfo)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return countInfo, nil
|
return countInfo, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user