- GetStoreOrderCountInfo排除掉LOCK了的订单

This commit is contained in:
gazebo
2019-04-17 15:19:57 +08:00
parent fa0236b6a0
commit 2cde3ba1b5

View File

@@ -76,10 +76,10 @@ func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID st
SELECT t1.status, COUNT(*) count
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) ) = ?
AND t1.order_created_at >= ?
AND t1.order_created_at >= ? AND t1.lock_status = ?
GROUP 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 {
return countInfo, nil
}