修改json解析
This commit is contained in:
@@ -108,21 +108,16 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
|
|||||||
String message = null;
|
String message = null;
|
||||||
try {
|
try {
|
||||||
JSONObject outputsJson = execDifyFlow.getJSONObject("outputs");
|
JSONObject outputsJson = execDifyFlow.getJSONObject("outputs");
|
||||||
JSONObject textJsonObject =outputsJson.getJSONObject("text");
|
// 咨询
|
||||||
if(textJsonObject.containsKey("answer")){
|
JSONObject textJsonObject =outputsJson.getJSONObject("text").getJSONObject("consult");
|
||||||
textJsonObject = textJsonObject.getJSONObject("answer"); // 投诉
|
|
||||||
}
|
|
||||||
ConsultDTO consultDTO = new ConsultDTO();
|
ConsultDTO consultDTO = new ConsultDTO();
|
||||||
consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),textJsonObject.getString("工单类别")));
|
consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),textJsonObject.getString("工单类别")));
|
||||||
consultDTO.setProblemDescription(textJsonObject.getString("问题描述"));
|
consultDTO.setProblemDescription(textJsonObject.getString("问题描述"));
|
||||||
consultDTO.setContactSex(textJsonObject.getString("工单联系人性别"));
|
consultDTO.setContactSex(textJsonObject.getString("工单联系人性别"));
|
||||||
consultDTO.setContactName(textJsonObject.getString("工单联系人姓名"));
|
consultDTO.setContactName(textJsonObject.getString("工单联系人姓名"));
|
||||||
consultDTO.setContactTelephone(textJsonObject.getString("工单联系电话"));
|
consultDTO.setContactTelephone(textJsonObject.getString("工单联系电话"));
|
||||||
|
// 投诉
|
||||||
JSONObject complainObject = outputsJson.getJSONObject("text1");
|
JSONObject complainObject = outputsJson.getJSONObject("text1").getJSONObject("complain");
|
||||||
if(complainObject.containsKey("answer")){
|
|
||||||
complainObject = complainObject.getJSONObject("answer"); // 投诉
|
|
||||||
}
|
|
||||||
ComplainDTO complainDTO = new ComplainDTO();
|
ComplainDTO complainDTO = new ComplainDTO();
|
||||||
complainDTO.setComplainType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT_TYPE.getCode(),complainObject.getString("投诉类型")));
|
complainDTO.setComplainType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT_TYPE.getCode(),complainObject.getString("投诉类型")));
|
||||||
complainDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.COMPLAIN.getCode(),complainObject.getString("工单类别")));
|
complainDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.COMPLAIN.getCode(),complainObject.getString("工单类别")));
|
||||||
|
|||||||
Reference in New Issue
Block a user