铭牌画像业务开发,并发请求

This commit is contained in:
ZLI263
2025-09-11 16:10:17 +08:00
parent 4652417920
commit 6aeea36dff
15 changed files with 71 additions and 35 deletions

View File

@@ -6,6 +6,8 @@ public enum CategoryEnum {
PHONE_VOICE("phone_voice", "语音电话"),
PORTRAIT_ALLIN("portrait_allin", "语音电话,用户画像"),
NAMEPLATE_VOICE("nameplate_voice", "铭牌"),
NAMEPLATE_VOICE_PORTRAIT("nameplate_voice_portrait", "铭牌客户画像"),
OTHER("未知", "未知记录"),
;
private String code;

View File

@@ -56,7 +56,7 @@ public class AiAnalysisDifyJob {
aiAnalysisRequestLogsList.stream().forEach(aiAnalysisRequestLogs -> {
JSONObject jsonResult = diFyFeign.queryWorkFlowById("Bearer "+aiAnalysisRequestLogs.getDifyAgentKey(),aiAnalysisRequestLogs.getWorkflowRunId());
String outputs = jsonResult.getString("outputs");
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
.aiAnalysisRequestId(aiAnalysisRequestLogs.getAiAnalysisRequestId())
.difyResponse(outputs)
.build());

View File

@@ -139,7 +139,7 @@ public class CorpusFailJob {
List<TmNameplateCorpus> nameplateCorpusList = tmNameplateCorpusService.queryTelephoneCorpusByCustomerFlowId( Arrays.asList(corpusReportDTO.getCustomerFlowId()));
if(CollectionUtils.isNotEmpty(nameplateCorpusList)) {
TmNameplateCorpus nameplateCorpus = nameplateCorpusList.get(0);
tmNameplateCorpusService.sendNameplateLto(execDifyFlow,oldAiAnalysisRequestLogs.getAiAnalysisRequestId(), nameplateCorpus);
tmNameplateCorpusService.sendNameplateLto(execDifyFlow,oldAiAnalysisRequestLogs.getAiAnalysisRequestId(), nameplateCorpus, BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode());
}
}else {
List<AicorpusTelephoneDTO> dccDtoList = tmTelephoneCorpusMapper.queryTelephoneCorpusBySourceIds( Arrays.asList(corpusReportDTO.getRecordId()));
@@ -300,7 +300,7 @@ public class CorpusFailJob {
aiAnalysisErrors1.setAiAnalysisRequestId(aiAnalysisRequestId);
aiAnalysisErrors1.setAiAnalysisErrorHandlingStatus("1");
aiAnalysisErrorsService.updateAiAnalysisErrors(aiAnalysisErrors1);
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
.aiAnalysisRequestId(data.getString("aiAnalysisRequestId"))
.businessResponse(message)
.difyResponse(data.toJSONString())

View File

@@ -2,18 +2,15 @@
package com.volvo.ai.analytic.center.mq;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.volvo.ai.analytic.center.dto.resp.AnalysisDifyResultDTO;
import com.volvo.ai.analytic.center.dto.resp.AnalysisResp;
import com.volvo.ai.analytic.center.entity.AiAnalysisRequestLogs;
import com.volvo.ai.analytic.center.service.AiAnalysisRequestLogsService;
import com.volvo.ai.analytic.center.service.DiFyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -72,7 +69,7 @@ public class AnalysisDifyCallbackMqConsumer implements RocketMQListener<MessageE
} else {
log.info("analysisDifyCallbackMqConsumer aiAnalysisRequestId{},回调请求失败url:{}: " ,analysisResp.getAiAnalysisRequestId(), aiAnalysisRequestLogs.getCallbackUrl());
}
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(analysisResp.getAiAnalysisRequestId()).businessResponse(outputs).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(analysisResp.getAiAnalysisRequestId()).businessResponse(outputs).build());
log.info(" analysisDifyCallbackMqConsumer耗时{}", System.currentTimeMillis() - startTime);
} catch (Exception e) {
log.info(" analysisDifyCallbackMqConsumer mq 处理失败:{}", e.getMessage());

View File

@@ -54,7 +54,8 @@ public class CorpusDccMqConsumer implements RocketMQListener<MessageExt> {
AicorpusTelephoneDTO aicorpusTelephone = objectMapper.readValue(message, AicorpusTelephoneDTO.class);
//DCC场景
if(Objects.equals(aicorpusTelephone.getCategoryCode(), Constant.CHANNEL_DCC)){
//TODO 这里需要确认客户画像下这个字段值是什么?
//TODO 这里需要确认客户画像下这个字段值是什么? 已经确认了和总结需求的dcc场景是一致的 所以不需要修改。。
//总结和客户画像都是这一个:Constant.CHANNEL_DCC
JSONObject jsonObject = JSONObject.parseObject( aicorpusTelephone.getDisplay());
log.info(" message: " + JSON.toJSONString(aicorpusTelephone));
tmTelephoneCorpusService.runTelephoneCorpusDify(aicorpusTelephone);

View File

@@ -5,7 +5,7 @@ import com.volvo.ai.analytic.center.entity.AiAnalysisRequestLogs;
public interface AiAnalysisRequestLogsService extends IService<AiAnalysisRequestLogs> {
boolean saveAiAnalysisRequestLogs(AiAnalysisRequestLogs aiAnalysisRequestLogs);
boolean saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs aiAnalysisRequestLogs);
AiAnalysisRequestLogs queryByAiAnalysisRequestId(String aiAnalysisRequestId);
AiAnalysisRequestLogs queryAiAnalysisRequestLogsByBusinessReponse(String sourceId);
}

View File

@@ -17,7 +17,7 @@ public interface TmNameplateCorpusService extends IService<TmNameplateCorpus> {
void processItem(TmNameplateCorpus item);
void sendNameplateLto(JSONObject execDifyFlow,String aiAnalysisRequestId, TmNameplateCorpus tmNameplateCorpus);
void sendNameplateLto(JSONObject execDifyFlow,String aiAnalysisRequestId, TmNameplateCorpus tmNameplateCorpus,String businessType);
ResultMsg<Object> updateNameplate(String message);

View File

@@ -86,7 +86,7 @@ public class AiAnalysisDifyServiceImpl implements AiAnalysisDifyService {
JSONObject difyJson = JSONObject.parseObject(analysisResp.getDifyResponse());
aiAnalysisRequestLogs.setBusinessResponse(difyJson.getString("outputs"));
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(aiAnalysisRequestLogs);
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(aiAnalysisRequestLogs);
if(StringUtils.isNotEmpty(oldAiAnalysisRequestLogs.getCallbackUrl())){
// 发送 mq
@@ -134,7 +134,7 @@ public class AiAnalysisDifyServiceImpl implements AiAnalysisDifyService {
}
private void saveAiAnalysisRequestLogs(AnalysisReq analysisReq, DiFyReq diFyReq, String aiAnalysisRequestId) {
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
.aiAnalysisRequestId(aiAnalysisRequestId)
.businessRequest(JSONObject.toJSONString(analysisReq.getData()))
.difyAgentKey(diFyReq.getFlowId())

View File

@@ -18,7 +18,7 @@ public class AiAnalysisRequestLogsServiceImpl extends ServiceImpl<AiAnalysisRequ
@Autowired
private AiAnalysisRequestLogsMapper aiAnalysisRequestLogsMapper;
@Override
public boolean saveAiAnalysisRequestLogs(AiAnalysisRequestLogs aiAnalysisRequestLogs) {
public boolean saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs aiAnalysisRequestLogs) {
AiAnalysisRequestLogs oldAiAnalysisRequestLogs= aiAnalysisRequestLogsMapper.queryByAiAnalysisRequestId(aiAnalysisRequestLogs.getAiAnalysisRequestId());

View File

@@ -15,7 +15,6 @@ import com.volvo.ai.analytic.center.dto.resp.ResultDTO;
import com.volvo.ai.analytic.center.entity.*;
import com.volvo.ai.analytic.center.enums.BizEnum;
import com.volvo.ai.analytic.center.enums.BusinessTypeEnum;
import com.volvo.ai.analytic.center.enums.CategoryEnum;
import com.volvo.ai.analytic.center.feign.CompetingBrandsClient;
import com.volvo.ai.analytic.center.mapper.TmOdsVdqwMessagearchivingMapper;
import com.volvo.ai.analytic.center.service.*;
@@ -165,7 +164,7 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService {
log.info("send mq DCC语料画像场景 {}", text);
tmTelephoneCorpusService.sendMq( BusinessTypeEnum.CORPUS_PORTRAIT_DCC.getCode(), text.toJSONString());
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
}
try {
@@ -268,7 +267,7 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService {
log.info("send mq ,企微语料,画像场景 {}", text);
tmTelephoneCorpusService.sendMq( BusinessTypeEnum.CORPUS_PORTRAIT_QIWEI.getCode(), text.toJSONString());
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
}
}
@@ -318,7 +317,7 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService {
log.info("send mq ,铭牌语料,画像场景 {}", text);
tmTelephoneCorpusService.sendMq( BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode(), text.toJSONString());
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
}
} catch (Exception e) {

View File

@@ -82,7 +82,7 @@ public class DiFyServiceImpl implements DiFyService{
diFyReq.setInputs(inputMap);
// 保存请求日志
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
.aiAnalysisRequestId(aiAnalysisRequestId)
.businessRequest(businessData)
.difyAgentKey(diFyReq.getFlowId())
@@ -107,7 +107,7 @@ public class DiFyServiceImpl implements DiFyService{
.build());
}
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder()
.aiAnalysisRequestId(aiAnalysisRequestId)
.difyResponse(data.toJSONString())
.build());

View File

@@ -9,9 +9,6 @@ import com.volvo.ai.analytic.center.entity.AiAnalysisErrors;
import com.volvo.ai.analytic.center.entity.AiAnalysisRequestLogs;
import com.volvo.ai.analytic.center.entity.DataMaskingRule;
import com.volvo.ai.analytic.center.enums.BusinessTypeEnum;
import com.volvo.ai.analytic.center.feign.RemoteCarModelClient;
import com.volvo.ai.analytic.center.mapper.AiAnalysisErrorsMapper;
import com.volvo.ai.analytic.center.mapper.TcIntelligentCustomerMapper;
import com.volvo.ai.analytic.center.service.*;
import com.volvo.ai.analytic.center.utils.AiAnalysisUtils;
import com.volvo.ai.analytic.center.utils.ConstantStr;
@@ -27,7 +24,6 @@ import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -113,7 +109,7 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
aiAnalysisErrors.setAiAnalysisErrorHandlingStatus("1");
aiAnalysisErrorsService.updateAiAnalysisErrors(aiAnalysisErrors);
}
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(message).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(message).build());
} catch (Exception e) {
log.error("四合一语料解析返回数据JSON格式化异常 {}", e);

View File

@@ -60,6 +60,9 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
@Value("${dify.corpus.nameplate.appkey}")
private String nameplateAppKey;
@Value("${dify.corpus.portrait.oneToken}")
private String oneTokenPortrait;
@Value("${batch.size}")
public int pageSize = 100;
@@ -154,10 +157,35 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
corpusReportDTO.setAnalysisScene(3l);
corpusReportDTO.setCarModel(carModel);
// 获取配置
JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode(), JSONObject.toJSONString(corpusReportDTO),null);
log.info("runDify execDifyFlow {}", execDifyFlow);
// 使用多线程并行执行两个业务场景
ExecutorService executorService = Executors.newFixedThreadPool(2);
long startTime = System.currentTimeMillis();
CompletableFuture<Void> summaryFuture = CompletableFuture.runAsync(() -> {
//第一个业务场景 开始: 总结和分类业务场景
JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode(),
JSONObject.toJSONString(corpusReportDTO),null);
log.info("runDify execDifyFlow ,铭牌语料 ,总结和分类业务,返回: {}", execDifyFlow);
}, executorService);
long endTime = System.currentTimeMillis();
log.info("第一个业务场景(总结和分类)执行时间: {} ms", (endTime - startTime));
//第一个业务场景, 结束
long startTime2 = System.currentTimeMillis();
CompletableFuture<Void> portraitFuture = CompletableFuture.runAsync(() -> {
// 创建新的DiFyReq对象以避免线程安全问题
diFyImageReq.setFlowId(oneTokenPortrait);
JSONObject execDifyFlowForPortrait = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode(),
JSONObject.toJSONString(corpusReportDTO), null);
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());
}
@@ -168,17 +196,22 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
@Override
public void sendNameplateLto(JSONObject execDifyFlow,String aiAnalysisRequestId, TmNameplateCorpus tmNameplateCorpus) {
public void sendNameplateLto(JSONObject execDifyFlow,String aiAnalysisRequestId, TmNameplateCorpus tmNameplateCorpus,String businessType) {
log.info("铭牌sendNameplateLto getCustomerFlowId:{}", tmNameplateCorpus.getCustomerFlowId());
if (null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")) {
String text = execDifyFlow.getString("outputs");
// 发送MQ
log.info("铭牌send mq {}", text);
tmTelephoneCorpusService.sendMq( CategoryEnum.NAMEPLATE_VOICE.getCode(), 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)) {// 客户画像
tmTelephoneCorpusService.sendMq( CategoryEnum.NAMEPLATE_VOICE_PORTRAIT.getCode(), text);
}
try {
ttNameplateRecordMapper.insert(TtNameplateRecord.builder().nameplateCorpusId(tmNameplateCorpus.getId()).customerFlowId(tmNameplateCorpus.getCustomerFlowId()).build());
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(aiAnalysisRequestId).businessResponse(text).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(aiAnalysisRequestId).businessResponse(text).build());
} catch (Exception e) {
log.info(" 铭牌语料处理保存报告异常processItem{} ", e);
}
@@ -192,6 +225,7 @@ 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");
Optional.ofNullable(aiAnalysisRequestLogsService.queryByAiAnalysisRequestId(aiAnalysisRequestId))
.orElseThrow(() -> new IllegalArgumentException("AiAnalysisRequestId查询对象为空"));
@@ -201,12 +235,15 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
JSONObject difyJson = JSONObject.parseObject(difyResponse);
aiAnalysisRequestLogs.setBusinessResponse(difyJson.getString("outputs"));
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(aiAnalysisRequestLogs);
aiAnalysisRequestLogs.setAiAnalysisRequestType(businessType);
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(aiAnalysisRequestLogs);
LambdaQueryWrapper<TmNameplateCorpus> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TmNameplateCorpus::getCustomerFlowId, customerFlowId);
List<TmNameplateCorpus> tmNameplateCorpusList = tmNameplateCorpusMapper.selectList(queryWrapper);
if (CollectionUtils.isNotEmpty(tmNameplateCorpusList)){
sendNameplateLto(difyJson,aiAnalysisRequestId, tmNameplateCorpusList.get(0));
if (CollectionUtils.isNotEmpty(tmNameplateCorpusList)){ //这是补偿机制
sendNameplateLto(difyJson,aiAnalysisRequestId, tmNameplateCorpusList.get(0),businessType);
LambdaQueryWrapper<AiAnalysisErrors> errorQueryWrapper = new LambdaQueryWrapper<>();
errorQueryWrapper.eq(AiAnalysisErrors::getAiAnalysisRequestId, aiAnalysisRequestId);
errorQueryWrapper.eq(AiAnalysisErrors::getAiAnalysisErrorHandlingStatus, "0");
@@ -215,6 +252,10 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
if (oldAiAnalysisErrors != null) {
aiAnalysisErrorsMapper.update(AiAnalysisErrors.builder().aiAnalysisRequestId(oldAiAnalysisErrors.getAiAnalysisRequestId()).aiAnalysisErrorHandlingStatus("1").build(), errorQueryWrapper);
}
}else {
}
return ResultMsg.ok();
}

View File

@@ -232,7 +232,7 @@ public class TmOdsVdqwMessagearchivingServiceImpl extends ServiceImpl<TmOdsVdqwM
try {
ttVdqwRecordMapper.insert(TtVdqwRecord.builder().acceptUserId(item.getFromUserId()).fromUserId(item.getAcceptUserId()).msgTime(maxMsgTimeItem.getMsgTime()).from_accept_user_id(item.getFromAcceptUserId()).build());
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(text.toJSONString()).build());
} catch (Exception e) {
log.info(" 企业语料处理保存报告异常processItem{} ", e);
}

View File

@@ -243,7 +243,7 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
aiAnalysisErrors.setAiAnalysisErrorHandlingStatus("1");
aiAnalysisErrorsService.updateAiAnalysisErrors(aiAnalysisErrors);
}
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(JSONObject.toJSONString(ltoMap)).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(JSONObject.toJSONString(ltoMap)).build());
} catch (Exception e) {
log.info(" 电话语料处理保存报告异常processItem{} ", e);
@@ -345,7 +345,7 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
aiAnalysisErrors.setAiAnalysisErrorHandlingStatus("1");
aiAnalysisErrorsService.updateAiAnalysisErrors(aiAnalysisErrors);
}
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(message).build());
aiAnalysisRequestLogsService.saveOrUpdateAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(message).build());
}