修改json解析
This commit is contained in:
@@ -105,22 +105,19 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
|
||||
if(null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")){
|
||||
|
||||
JSONObject textJsonObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text");
|
||||
JSONObject consult = textJsonObject.getJSONObject("answer"); // 咨询
|
||||
ConsultDTO consultDTO = new ConsultDTO();
|
||||
consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),consult.getString("工单类别")));
|
||||
consultDTO.setProblemDescription(consult.getString("问题描述"));
|
||||
consultDTO.setContactSex(consult.getString("工单联系人性别"));
|
||||
consultDTO.setContactName(consult.getString("工单联系人姓名"));
|
||||
consultDTO.setContactTelephone(consult.getString("工单联系电话"));
|
||||
consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),textJsonObject.getString("工单类别")));
|
||||
consultDTO.setProblemDescription(textJsonObject.getString("问题描述"));
|
||||
consultDTO.setContactSex(textJsonObject.getString("工单联系人性别"));
|
||||
consultDTO.setContactName(textJsonObject.getString("工单联系人姓名"));
|
||||
consultDTO.setContactTelephone(textJsonObject.getString("工单联系电话"));
|
||||
|
||||
JSONObject complainObject = execDifyFlow.getJSONObject("outputs").getJSONObject("text1");
|
||||
|
||||
JSONObject complain = complainObject.getJSONObject("complain"); // 投诉
|
||||
ComplainDTO complainDTO = new ComplainDTO();
|
||||
complainDTO.setComplainType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT_TYPE.getCode(),complain.getString("投诉类型")));
|
||||
complainDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.COMPLAIN.getCode(),complain.getString("工单类别")));
|
||||
complainDTO.setComplainTitle(complain.getString("投诉主题"));
|
||||
complainDTO.setProblemDescription(complain.getString("问题描述"));
|
||||
complainDTO.setComplainType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT_TYPE.getCode(),complainObject.getString("投诉类型")));
|
||||
complainDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.COMPLAIN.getCode(),complainObject.getString("工单类别")));
|
||||
complainDTO.setComplainTitle(complainObject.getString("投诉主题"));
|
||||
complainDTO.setProblemDescription(complainObject.getString("问题描述"));
|
||||
complainDTO.setContactSex(consultDTO.getContactSex());
|
||||
complainDTO.setContactName(consultDTO.getContactName());
|
||||
complainDTO.setContactTelephone(consultDTO.getContactTelephone());
|
||||
|
||||
Reference in New Issue
Block a user