- fix some annotation.
This commit is contained in:
@@ -11,7 +11,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
maxLastHours = 2 * 24 // 最多只能查询两天内的订单数据
|
||||
maxLastHours = 7 * 24 // 最多只能查询7天内的订单数据
|
||||
defLastHours = 2 * 24 // 缺省是两天内的订单
|
||||
defPageSize = 50
|
||||
)
|
||||
|
||||
@@ -22,6 +23,8 @@ var (
|
||||
func (c *OrderManager) GetStoreOrderInfo(storeID string, lastHours int, fromStatus, toStatus, offset, pageSize int) (orders []*model.GoodsOrderExt, err error) {
|
||||
if lastHours > maxLastHours {
|
||||
lastHours = maxLastHours
|
||||
} else if lastHours == 0 {
|
||||
lastHours = defLastHours
|
||||
}
|
||||
if toStatus == 0 {
|
||||
toStatus = fromStatus
|
||||
@@ -53,6 +56,8 @@ func (c *OrderManager) GetStoreOrderInfo(storeID string, lastHours int, fromStat
|
||||
func (c *OrderManager) GetStoreOrderCountInfo(storeID string, lastHours int) (countInfo []*model.GoodsOrderCountInfo, err error) {
|
||||
if lastHours > maxLastHours {
|
||||
lastHours = maxLastHours
|
||||
} else if lastHours == 0 {
|
||||
lastHours = defLastHours
|
||||
}
|
||||
|
||||
db := orm.NewOrm()
|
||||
|
||||
Reference in New Issue
Block a user