This commit is contained in:
zren25
2025-04-07 18:05:59 +08:00
parent ad39e8cb63
commit e642db2f93

View File

@@ -107,9 +107,10 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
String aiAnalysisRequestId = null;
String message = null;
try {
JSONObject textJsonObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text");
JSONObject outputsJson = execDifyFlow.getJSONObject("outputs");
JSONObject textJsonObject =outputsJson.getJSONObject("text");
if(textJsonObject.containsKey("answer")){
textJsonObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text").getJSONObject("answer"); // 投诉
textJsonObject = textJsonObject.getJSONObject("answer"); // 投诉
}
ConsultDTO consultDTO = new ConsultDTO();
consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),textJsonObject.getString("工单类别")));
@@ -118,9 +119,9 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
consultDTO.setContactName(textJsonObject.getString("工单联系人姓名"));
consultDTO.setContactTelephone(textJsonObject.getString("工单联系电话"));
JSONObject complainObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text1");
JSONObject complainObject = outputsJson.getJSONObject("text1");
if(complainObject.containsKey("answer")){
complainObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text1").getJSONObject("answer"); // 投诉
complainObject = complainObject.getJSONObject("answer"); // 投诉
}
ComplainDTO complainDTO = new ComplainDTO();
complainDTO.setComplainType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT_TYPE.getCode(),complainObject.getString("投诉类型")));