|
@@ -139,7 +139,7 @@ public class ThirdPartToolAppServiceImpl implements ThirdPartToolAppService {
|
|
|
throw new Exception("[jobs status:write result]fail to get result :" + jobId);
|
|
|
}
|
|
|
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(result, getHeader());
|
|
|
- String url = getGenerateReportUrl(jobId, thirdPartToolJob.getOwnerId(), EnterpriseReportType.APP);
|
|
|
+ String url = getGenerateReportUrl(EnterpriseReportType.APP);
|
|
|
Map<String, Object> res;
|
|
|
try {
|
|
|
res = rt.postForObject(url, httpEntity, Map.class);
|
|
@@ -223,7 +223,7 @@ public class ThirdPartToolAppServiceImpl implements ThirdPartToolAppService {
|
|
|
//TODO set command
|
|
|
thirdPartToolAppStartCommand.setDownloadUrl(thirdPartToolJob.getUrl());
|
|
|
thirdPartToolAppStartCommand.setLimitTime(thirdPartToolAppStartConfig.getLimitTime());
|
|
|
- thirdPartToolAppStartCommand.setTraceId(jobId + "");
|
|
|
+ thirdPartToolAppStartCommand.setTraceId(null);
|
|
|
|
|
|
RestTemplate rt = new RestTemplate();
|
|
|
HttpEntity<ThirdPartToolAppStartCommand> httpEntity = new HttpEntity<>(thirdPartToolAppStartCommand, getHeader());
|
|
@@ -259,8 +259,8 @@ public class ThirdPartToolAppServiceImpl implements ThirdPartToolAppService {
|
|
|
}
|
|
|
String appScore = result.get("appScore").toString();
|
|
|
thirdPartToolJob.setResult(appScore);
|
|
|
- createSubmitRecord(thirdPartToolJob.getGroupId(), thirdPartToolJob.getOwnerId(), JSONObject.fromObject(result));
|
|
|
thirdPartToolJobDao.save(thirdPartToolJob);
|
|
|
+ createSubmitRecord(thirdPartToolJob.getGroupId(), thirdPartToolJob.getOwnerId(), JSONObject.fromObject(appScore));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -333,13 +333,13 @@ public class ThirdPartToolAppServiceImpl implements ThirdPartToolAppService {
|
|
|
|
|
|
private String getAppAutoTestStartUrl() throws Exception {
|
|
|
String api = "/api/v1/runTest";
|
|
|
- return "http://f9xpdu.natappfree.cc" + api;
|
|
|
+ return "http://t7qmy9.natappfree.cc" + api;
|
|
|
//return "http://" + appAutoTestServerHost + ":" + appAutoTestServerPort + api;
|
|
|
}
|
|
|
|
|
|
private String getAppAutoTestStatusUrl(String traceId) throws Exception {
|
|
|
String api = "/api/v1/result?traceId={traceId}";
|
|
|
- return "http://f9xpdu.natappfree.cc" + api.replace("{traceId}", "" + traceId);
|
|
|
+ return "http://t7qmy9.natappfree.cc" + api.replace("{traceId}", "" + traceId);
|
|
|
//return "http://" + appAutoTestServerHost + ":" + appAutoTestServerPort + api.replace("{traceId}", "" + traceId);
|
|
|
}
|
|
|
|
|
@@ -349,11 +349,8 @@ public class ThirdPartToolAppServiceImpl implements ThirdPartToolAppService {
|
|
|
return headers;
|
|
|
}
|
|
|
|
|
|
- private String getGenerateReportUrl(Long orderId, Long ownerId, String reportType) {
|
|
|
- String api = "/api/report/generate/order/{orderId}/owner/{ownerId}/reportType/{reportType}"
|
|
|
- .replace("{orderId}", "" + orderId)
|
|
|
- .replace("{ownerId}", "" + ownerId)
|
|
|
- .replace("{reportType}", reportType);
|
|
|
+ private String getGenerateReportUrl(String reportType) {
|
|
|
+ String api = "/api/report/generate/{reportType}".replace("{reportType}", reportType);
|
|
|
return "http://" + generateReportHost + ":" + generateReportPort + api;
|
|
|
}
|
|
|
}
|