@@ -72,18 +72,6 @@ public class UpdateWaittStatusService { | |||
// 硬件停止后,停止录制 | |||
dspService.stopRecord(businessList.get(0).getMsgId()); | |||
// 硬件停止后,查询录屏信息 | |||
JsonResult jsonResult = dspService.queryRecord(businessList.get(0).getMsgId()); | |||
if (0 == jsonResult.getCode()) { | |||
DspCallbackQueryVo dspCallbackQueryVo = (DspCallbackQueryVo) jsonResult.getData(); | |||
log.info("查询录屏信息,dsp响应体:{}", JacksonUtil.obj2StringPretty(dspCallbackQueryVo)); | |||
if (ObjectUtil.isNotEmpty(dspCallbackQueryVo)) { | |||
inspectionUpdate.setVideoUrl(dspCallbackQueryVo.getRecordingVideoUrl()); | |||
} else { | |||
log.info("查询录屏信息,录屏视频地址为空"); | |||
} | |||
} | |||
//获取天气信息 | |||
JsonResult result = this.getWeather(CommonConfig.airportURL, inspection.getAirportId()); | |||
if (0 != result.getCode()) { |
@@ -30,6 +30,9 @@ public class StartRecordService { | |||
@Value("${tuoheng.dsp-domain-url:}") | |||
private String dspDomainUrl; | |||
@Value("${tuoheng.dsp-callback-url:}") | |||
private String dspCallbackUrl; | |||
/** | |||
* 调用DSP接口 | |||
* | |||
@@ -41,6 +44,7 @@ public class StartRecordService { | |||
JSONObject jsonObject = new JSONObject(); | |||
jsonObject.put("requestId", request.getRequestId()); | |||
jsonObject.put("pullUrl", request.getPullUrl()); | |||
jsonObject.put("callbackUrl", dspCallbackUrl); | |||
log.info("调用dsp平台,开始录制接口,url:{}", url); | |||
log.info("调用dsp平台,开始录制接口,jsonObject:{}", jsonObject); |
@@ -42,21 +42,21 @@ public class StopRecordService { | |||
log.info("调用dsp平台,停止录制接口,url:{}", url); | |||
log.info("调用dsp平台,停止录制接口,jsonObject:{}", jsonObject); | |||
ResponseEntity<JsonResult> response; | |||
ResponseEntity<JsonResult> response = null; | |||
try { | |||
response = restTemplate.exchange(url, HttpMethod.PUT, httpEntity, JsonResult.class); | |||
} catch (Exception e) { | |||
log.info("调用dsp平台,停止录制接口异常, e:{}", e); | |||
throw new ServiceException("调用dsp平台,停止录制接口异常"); | |||
// throw new ServiceException("调用dsp平台,停止录制接口异常"); | |||
} | |||
if (response == null || !response.hasBody()) { | |||
log.error("调用dsp平台,停止录制接口返回为空!"); | |||
throw new ServiceException("调用dsp平台,停止录制接口返回为空"); | |||
// throw new ServiceException("调用dsp平台,停止录制接口返回为空"); | |||
} | |||
JsonResult jsonResult = response.getBody(); | |||
if (0 != jsonResult.getCode()) { | |||
log.info("调用dsp平台,停止录制接口返回失败,jsonResult:{}", jsonResult.getMsg()); | |||
throw new ServiceException("调用dsp平台,停止录制接口返回失败"); | |||
log.info("调用dsp平台,停止录制接口返回失败,jsonResult:{}", jsonResult); | |||
// throw new ServiceException("调用dsp平台,停止录制接口返回失败"); | |||
} | |||
return jsonResult; | |||
} |