- 修正各平台与拉取订单相关的API的bug

This commit is contained in:
gazebo
2019-07-18 18:35:59 +08:00
parent e29e30604e
commit 061e906d17
8 changed files with 210 additions and 23 deletions

View File

@@ -476,7 +476,7 @@ func (a *API) OrderListAll(shopID string, baiduShopID int64, startTime, endTime
return nil, err
}
listOrder = append(listOrder, result.List...)
if result.Page == result.Pages {
if result.Page >= result.Pages {
break
}
page++

View File

@@ -33,6 +33,15 @@ func TestOrderList(t *testing.T) {
}
}
func TestOrderListAll(t *testing.T) {
result, err := api.OrderListAll("", 32267089397, 1563379200, 1563465599, 0)
if err != nil {
t.Fatal(err)
} else {
t.Log(utils.Format4Output(result, false))
}
}
func TestOrderPartRefundGet(t *testing.T) {
result, err := api.OrderPartRefundGet("1557459492221457830")
if err != nil {