From b2e1afa34211b3a67682b31c6c9816219262841d Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 19 May 2021 17:11:22 +0800 Subject: [PATCH] aa --- platformapi/autonavi/autonavi.go | 4 +++- platformapi/jdapi/order_test.go | 8 ++++---- platformapi/mtwmapi/order_test.go | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/platformapi/autonavi/autonavi.go b/platformapi/autonavi/autonavi.go index 790ff4f5..ac1500d7 100644 --- a/platformapi/autonavi/autonavi.go +++ b/platformapi/autonavi/autonavi.go @@ -444,7 +444,9 @@ func (a *API) GetCoordinateFromAddressAll(address string, cityInfo string) (getC getCoordinateFromAddressByPageAllResult.Lat = utils.Str2Float64WithDefault(locationList[1], 0) } getCoordinateFromAddressByPageAllResult.CityName = geocode["city"].(string) - getCoordinateFromAddressByPageAllResult.AdName = geocode["district"].(string) + if str, ok := geocode["district"].(string); ok { + getCoordinateFromAddressByPageAllResult.AdName = str + } } } return getCoordinateFromAddressByPageAllResult, err diff --git a/platformapi/jdapi/order_test.go b/platformapi/jdapi/order_test.go index 463a189e..23020acd 100644 --- a/platformapi/jdapi/order_test.go +++ b/platformapi/jdapi/order_test.go @@ -7,7 +7,7 @@ import ( ) func TestQuerySingleOrder(t *testing.T) { - retVal, err := api.QuerySingleOrder("2027681234000062") + retVal, err := api.QuerySingleOrder("2111729701001462") t.Log(utils.Format4Output(retVal, false)) if err != nil { t.Error(err) @@ -120,9 +120,9 @@ func TestOrderAddTips(t *testing.T) { func TestOrderQuery2(t *testing.T) { orderList, _, err := api.OrderQuery2(&OrderQueryParam{ OrderPurchaseTimeBegin: "2021-04-19 00:00:00", - OrderPurchaseTimeEnd: "2021-04-19 23:59:59", - PageNo: 1, - PageSize: 99999, + OrderPurchaseTimeEnd: "2021-04-19 23:59:59", + PageNo: 1, + PageSize: 99999, }) t.Log(utils.Format4Output(orderList, false)) if err != nil { diff --git a/platformapi/mtwmapi/order_test.go b/platformapi/mtwmapi/order_test.go index 0521c1b1..25900e68 100644 --- a/platformapi/mtwmapi/order_test.go +++ b/platformapi/mtwmapi/order_test.go @@ -17,7 +17,7 @@ func TestOrderViewStatus(t *testing.T) { } func TestOrderGetOrderDetail(t *testing.T) { - result, err := api.OrderGetOrderDetail(112028023003605293, false) + result, err := api.OrderGetOrderDetail(70707103086675718, false) if err != nil { t.Fatal(err) }