- status judge.

This commit is contained in:
gazebo
2018-08-23 11:51:20 +08:00
parent 1cb266d4d1
commit 5f10f01027
7 changed files with 77 additions and 51 deletions

View File

@@ -44,8 +44,8 @@ func (c *OrderManager) GetStoreOrderInfo(storeID string, lastHours int, fromStat
WHERE IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
AND t1.order_created_at >= ?
AND t1.Status >= ? AND t1.Status <= ?
LIMIT ? OFFSET ?
ORDER BY t1.order_created_at
LIMIT ? OFFSET ?
`, storeID, time.Now().Add(-time.Duration(lastHours)*time.Hour), fromStatus, toStatus, pageSize, offset).QueryRows(&orders)
if err == nil {
return orders, nil