- store page api for ebai.

This commit is contained in:
gazebo
2019-02-15 17:46:13 +08:00
parent 61d6840bdb
commit b1cf533db6
6 changed files with 178 additions and 3 deletions

View File

@@ -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&param=%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
}

View File

@@ -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)
}