Commit 61d7de38 by xuyamei

接口报错优化

parent 9ecfd851
...@@ -38,18 +38,19 @@ public class TestAXFAggOrder extends BaseTestImpl { ...@@ -38,18 +38,19 @@ public class TestAXFAggOrder extends BaseTestImpl {
String thirdOrderNo = ""; String thirdOrderNo = "";
for (int i = 0; i < total; i++){ for (int i = 0; i < total; i++){
receivedAmount = response.getJSONObject("result").getJSONArray("records").getJSONObject(i).getDouble("receivedAmount"); receivedAmount = response.getJSONObject("result").getJSONArray("records").getJSONObject(i).getDouble("receivedAmount");
if (receivedAmount > 0){ if (receivedAmount > 0){
// 查询详情数据 // 查询详情数据
receivedActualAmount = response.getJSONObject("result").getJSONArray("records").getJSONObject(i).getDouble("receivedActualAmount"); receivedActualAmount = response.getJSONObject("result").getJSONArray("records").getJSONObject(i).getDouble("receivedActualAmount");
thirdOrderNo = response.getJSONObject("result").getJSONArray("records").getJSONObject(i).getString("thirdOrderNo"); thirdOrderNo = response.getJSONObject("result").getJSONArray("records").getJSONObject(i).getString("thirdOrderNo");
body = "{\"current\":0,\"size\":20,\"studioId\":\""+xmAppApi.getLoginInfo().getStudioId()+"\",\"brandId\":\""+xmAppApi.getLoginInfo().getBrandId()+"\",\"commodityCardType\":\"DEPOSIT_CARD\",\"voucherBusinessNo\":null,\"thirdOrderNo\":"+thirdOrderNo+",\"operatorId\":\""+xmAppApi.getLoginInfo().getAdminId()+"\"}";
xmAppApi.doRequest(RequestType.JSON,params,body,headers).assetsSuccess(true);
response = xmAppApi.getBodyInJSON();
// 验证统计条返回的数据与列表统计数据一致
Assert.assertEquals(response.getJSONObject("result").getString("receivedActualAmount").equals(String.valueOf(receivedActualAmount)), true);
break; break;
} }
body = "{\"current\":0,\"size\":20,\"studioId\":\""+xmAppApi.getLoginInfo().getStudioId()+"\",\"brandId\":\""+xmAppApi.getLoginInfo().getBrandId()+"\",\"commodityCardType\":\"DEPOSIT_CARD\",\"voucherBusinessNo\":null,\"thirdOrderNo\":"+thirdOrderNo+",\"operatorId\":\""+xmAppApi.getLoginInfo().getAdminId()+"\"}";
xmAppApi.doRequest(RequestType.JSON,params,body,headers).assetsSuccess(true);
response = xmAppApi.getBodyInJSON();
// 验证统计条返回的数据与列表统计数据一致
Assert.assertEquals(response.getJSONObject("result").getString("receivedActualAmount").equals(String.valueOf(receivedActualAmount)), true);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment