|
|
@@ -205,20 +205,28 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi |
|
|
|
//调用DSP接口 |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put("requestId",thMission.getRequestId()); |
|
|
|
JSONObject responseJson = dspService.serviceStopApplication(jsonObject); |
|
|
|
if(responseJson.getIntValue("code") == 0){ |
|
|
|
if(responseJson.containsKey("data") && ObjectUtil.isNotEmpty(responseJson.get("data"))) { |
|
|
|
String requestId = responseJson.getJSONObject("data").getString("requestId"); |
|
|
|
log.info("dsp实时调用响应requestId:{}", requestId); |
|
|
|
}else{ |
|
|
|
log.info("dsp实时调用响应:{}",responseJson); |
|
|
|
JSONObject responseJson=new JSONObject(); |
|
|
|
try { |
|
|
|
responseJson = dspService.serviceStopApplication(jsonObject); |
|
|
|
if(responseJson.getIntValue("code") == 0){ |
|
|
|
if(responseJson.containsKey("data") && ObjectUtil.isNotEmpty(responseJson.get("data"))) { |
|
|
|
String requestId = responseJson.getJSONObject("data").getString("requestId"); |
|
|
|
log.info("dsp实时调用响应requestId:{}", requestId); |
|
|
|
}else{ |
|
|
|
log.info("dsp实时调用响应:{}",responseJson); |
|
|
|
} |
|
|
|
result=true; |
|
|
|
}else { |
|
|
|
log.error("dsp实时调用失败:{}", responseJson); |
|
|
|
thMissionUpdate.setAnalyseStatus(AiAnalyseStatusEnum.FAILED.getCode()); |
|
|
|
thMissionMapper.updateById(thMissionUpdate); |
|
|
|
} |
|
|
|
result=true; |
|
|
|
}else { |
|
|
|
}catch (Exception e){ |
|
|
|
log.error("dsp实时调用失败:{}", responseJson); |
|
|
|
thMissionUpdate.setAnalyseStatus(AiAnalyseStatusEnum.FAILED.getCode()); |
|
|
|
thMissionMapper.updateById(thMissionUpdate); |
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|