- store page api for ebai.
This commit is contained in:
@@ -78,7 +78,8 @@ func (a *API) GetStoreOrderInfo(orderId string) (storeOrderInfo map[string]inter
|
||||
retVal, err := a.AccessStorePage(fmt.Sprintf("order/newManager/search?pageNo=1&pageSize=1&orderBy=&desc=true¶m=%s&stationNo=", orderId))
|
||||
// baseapi.SugarLogger.Debug(utils.Format4Output(retVal, false))
|
||||
if err == nil {
|
||||
resultList := retVal["result"].(map[string]interface{})["newOrderinfoMains"].(map[string]interface{})["resultList"].([]interface{})
|
||||
newOrderinfoMains := retVal["result"].(map[string]interface{})["newOrderinfoMains"].(map[string]interface{})
|
||||
resultList := newOrderinfoMains["resultList"].([]interface{})
|
||||
if len(resultList) > 0 {
|
||||
return resultList[0].(map[string]interface{}), nil
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestGetRealMobileNumber4Order(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if mobile != desiredMobile {
|
||||
t.Fatalf("orderId:%s's mobile is wrong, should be 18569035610, but it's:%s", orderId, desiredMobile)
|
||||
t.Fatalf("orderId:%s's mobile is wrong, should be %s, but it's:%s", orderId, desiredMobile, mobile)
|
||||
}
|
||||
baseapi.SugarLogger.Debug(mobile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user