修改json解析

This commit is contained in:
zren25
2025-04-07 14:47:33 +08:00
parent 05c8948c93
commit 42030322eb

View File

@@ -105,13 +105,13 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
if(null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")){ if(null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")){
JSONObject textJsonObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text"); JSONObject textJsonObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text");
JSONObject consult = textJsonObject.getJSONObject("answer"); // 咨询 // JSONObject consult = textJsonObject.getJSONObject("answer"); // 咨询
ConsultDTO consultDTO = new ConsultDTO(); ConsultDTO consultDTO = new ConsultDTO();
consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),consult.getString("工单类别"))); consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),textJsonObject.getString("工单类别")));
consultDTO.setProblemDescription(consult.getString("问题描述")); consultDTO.setProblemDescription(textJsonObject.getString("问题描述"));
consultDTO.setContactSex(consult.getString("工单联系人性别")); consultDTO.setContactSex(textJsonObject.getString("工单联系人性别"));
consultDTO.setContactName(consult.getString("工单联系人姓名")); consultDTO.setContactName(textJsonObject.getString("工单联系人姓名"));
consultDTO.setContactTelephone(consult.getString("工单联系电话")); consultDTO.setContactTelephone(textJsonObject.getString("工单联系电话"));
JSONObject complainObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text1"); JSONObject complainObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text1");