增加version字段
This commit is contained in:
@@ -103,35 +103,20 @@ public class CorpusFailJob {
|
||||
if (null != oldAiAnalysisRequestLogs && StringUtils.isBlank(oldAiAnalysisRequestLogs.getBusinessResponse())) {
|
||||
DiFyReq diFyReq = JSONObject.parseObject(oldAiAnalysisRequestLogs.getDifyRequest(), DiFyReq.class);
|
||||
CorpusReportDTO corpusReportDTO = JSONObject.parseObject(oldAiAnalysisRequestLogs.getBusinessRequest(), CorpusReportDTO.class);
|
||||
Map<String, String> ltoMap = new HashMap<>();
|
||||
ltoMap.put("analysisRecordId", oldAiAnalysisRequestLogs.getAiAnalysisRequestId());
|
||||
ltoMap.put("analysisScene", corpusReportDTO.getAnalysisScene() + "");
|
||||
|
||||
String tag = "";
|
||||
if (null != corpusReportDTO && corpusReportDTO.getAnalysisScene() == 1) { //企微
|
||||
ltoMap.put("unionId", corpusReportDTO.getUnionId());
|
||||
ltoMap.put("consultantId", corpusReportDTO.getUserId());
|
||||
tag = CategoryEnum.ENTERPRISE_WECHAT.getCode();
|
||||
|
||||
JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyReq);
|
||||
log.info(" corpusFailTask runDify execDifyFlow {}", execDifyFlow);
|
||||
if (null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")) {
|
||||
String text = execDifyFlow.getJSONObject("outputs").getString("text");
|
||||
String resultStrOne = FlowResultSplitUtil.flowOutputTextSplit(text, "任务1", "任务2");
|
||||
String resultStrTwo = FlowResultSplitUtil.flowOutputTextSplit(text, "任务2", null);
|
||||
if (StringUtils.isBlank(resultStrOne) || StringUtils.isBlank(resultStrTwo)) {
|
||||
log.info(" corpusFailTask 企微语料解析为空,text:{}", text);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ltoMap.put("communicateDate", corpusReportDTO.getCorpusTime());
|
||||
ltoMap.put("analysisResult", resultStrOne.replace("#", ""));
|
||||
ltoMap.put("analysisDetail", resultStrTwo);
|
||||
JSONObject text = execDifyFlow.getJSONObject("outputs");
|
||||
// 发送MQ
|
||||
log.info("corpusFailTask send mq {}", ltoMap);
|
||||
tmTelephoneCorpusService.sendMq(tag, JSONObject.toJSONString(ltoMap));
|
||||
log.info("send mq {}", text);
|
||||
tmTelephoneCorpusService.sendMq(tag, text.toJSONString());
|
||||
// 保存报告
|
||||
oldAiAnalysisRequestLogs.setBusinessResponse(JSONObject.toJSONString(ltoMap));
|
||||
oldAiAnalysisRequestLogs.setBusinessResponse( text.toJSONString());
|
||||
|
||||
oldAiAnalysisRequestLogs.setDifyResponse(JSON.toJSONString(execDifyFlow));
|
||||
updateDiFyRequest(oldAiAnalysisRequestLogs, oldAiAnalysisRequestLogs.getAiAnalysisRequestId());
|
||||
|
||||
@@ -210,6 +210,7 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
|
||||
inputMap.put("model", carModel);
|
||||
inputMap.put("customerFlowId", item.getCustomerFlowId());
|
||||
inputMap.put("analysisScene", "3");
|
||||
inputMap.put("version",2);
|
||||
diFyImageReq.setInputs(inputMap);
|
||||
|
||||
CorpusReportDTO corpusReportDTO = new CorpusReportDTO();
|
||||
|
||||
@@ -200,6 +200,7 @@ public class TmOdsVdqwMessagearchivingServiceImpl extends ServiceImpl<TmOdsVdqwM
|
||||
inputMap.put("unionId", unionId);
|
||||
inputMap.put("consultantId", userId);
|
||||
inputMap.put("communicateDate", DateUtil.format(maxMsgTimeItem.getMsgTime(), DatePattern.NORM_DATETIME_PATTERN));
|
||||
inputMap.put("version",2);
|
||||
diFyImageReq.setInputs(inputMap);
|
||||
|
||||
CorpusReportDTO corpusReportDTO = new CorpusReportDTO();
|
||||
|
||||
@@ -145,6 +145,7 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
|
||||
inputMap.put("analysisScene", "2");
|
||||
inputMap.put("recordId", aicorpusTelephone.getSourceId());
|
||||
inputMap.put("communicateDate", formattedDateStartTime);
|
||||
inputMap.put("version",2);
|
||||
diFyImageReq.setInputs(inputMap);
|
||||
CorpusReportDTO corpusReportDTO = new CorpusReportDTO();
|
||||
corpusReportDTO.setCorpusTime(formattedDateStartTime);
|
||||
|
||||
Reference in New Issue
Block a user