a
This commit is contained in:
@@ -94,7 +94,7 @@ func GetDeliveryOrders(db *DaoDB, userIDs []string, statuss []int, fromTime, toT
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
func GetOrders(db *DaoDB, orderID string, orderType int, cityCodes []int, fromTime, toTime time.Time, keyword string, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
func GetOrders(db *DaoDB, orderID, userID string, orderType int, cityCodes []int, fromTime, toTime time.Time, keyword string, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
var orders []*model.Order
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS a.*
|
||||
@@ -110,6 +110,10 @@ func GetOrders(db *DaoDB, orderID string, orderType int, cityCodes []int, fromTi
|
||||
sql += ` AND a.order_id = ?`
|
||||
sqlParams = append(sqlParams, orderID)
|
||||
}
|
||||
if userID != "" {
|
||||
sql += ` AND a.user_id = ?`
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
if orderType != 0 {
|
||||
sql += ` AND a.type = ?`
|
||||
sqlParams = append(sqlParams, orderType)
|
||||
|
||||
Reference in New Issue
Block a user