解决 业务类型错位问题
This commit is contained in:
@@ -193,17 +193,13 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
|
||||
log.info("runDify execDifyFlow ,客户画像场景 ,token-{} , 对象: {}", oneTokenPortrait, diFyImageReq2);
|
||||
JSONObject execDifyFlowForPortrait = diFyService.executeDifyFlow(diFyImageReq2, BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode(),
|
||||
JSONObject.toJSONString(corpusReportDTO), null);
|
||||
|
||||
updateNameplate(execDifyFlowForPortrait.toJSONString());
|
||||
log.info("runDify execDifyFlow ,铭牌语料 ,客户画像场景,返回: {}", execDifyFlowForPortrait);
|
||||
|
||||
}, executorService);
|
||||
long endTime2 = System.currentTimeMillis();
|
||||
log.info("第二个业务场景(用户画像)执行时间: {} ms", (endTime2 - startTime2));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("nameplate processItem error {}", e.getMessage());
|
||||
}
|
||||
@@ -220,10 +216,10 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
|
||||
String text = execDifyFlow.getString("outputs");
|
||||
// 发送MQ
|
||||
log.info("铭牌send mq 业务类型是:{}, Json 是:{}", businessType, text);
|
||||
if (BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode().equals(businessType)) {//一句话总结+分类
|
||||
tmTelephoneCorpusService.sendMq( CategoryEnum.NAMEPLATE_VOICE.getCode(), text);
|
||||
}else if (BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode().equals(businessType)) {// 客户画像
|
||||
if (BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode().equals(businessType)) {// 客户画像
|
||||
tmTelephoneCorpusService.sendMq( CategoryEnum.NAMEPLATE_VOICE_PORTRAIT.getCode(), text);
|
||||
}else { //一句话总结+分类
|
||||
tmTelephoneCorpusService.sendMq( CategoryEnum.NAMEPLATE_VOICE.getCode(), text);
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +240,12 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
|
||||
String aiAnalysisRequestId = analysisResp.getString("aiAnalysisRequestId");
|
||||
String difyResponse = analysisResp.getString("difyResponse");
|
||||
String customerFlowId = analysisResp.getString("customerFlowId");
|
||||
String businessType = analysisResp.getString("businessType");
|
||||
String businessType = BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode();
|
||||
if (aiAnalysisRequestId.indexOf(BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode())>=0){
|
||||
businessType = BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode();
|
||||
}else {
|
||||
businessType = BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode();
|
||||
}
|
||||
Optional.ofNullable(aiAnalysisRequestLogsService.queryByAiAnalysisRequestId(aiAnalysisRequestId))
|
||||
.orElseThrow(() -> new IllegalArgumentException("AiAnalysisRequestId查询对象为空!"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user