格式化返回结果

This commit is contained in:
zren25
2025-04-11 15:21:45 +08:00
parent a3e654485f
commit 0cbab38651
3 changed files with 10 additions and 11 deletions

View File

@@ -227,6 +227,12 @@
</dependency> </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version> <!-- 请根据需要选择合适的版本 -->
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@@ -2,9 +2,6 @@ package com.volvo.ai.analytic.center.service;
import com.volvo.ai.analytic.center.dto.req.FourInOneRequestDTO; import com.volvo.ai.analytic.center.dto.req.FourInOneRequestDTO;
import java.util.List;
import java.util.Map;
/** /**
* @description 电话语料表-同步表 * @description 电话语料表-同步表
* @author BEJSON * @author BEJSON
@@ -18,5 +15,4 @@ public interface IntelligentCustomerService{
void sendMq( String message); void sendMq( String message);
Map<String, List<String>> queryTcIntelligentCustomer();
} }

View File

@@ -1,7 +1,6 @@
package com.volvo.ai.analytic.center.service.impl; package com.volvo.ai.analytic.center.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.volvo.ai.analytic.center.constant.Constant; import com.volvo.ai.analytic.center.constant.Constant;
import com.volvo.ai.analytic.center.dto.req.DiFyReq; import com.volvo.ai.analytic.center.dto.req.DiFyReq;
import com.volvo.ai.analytic.center.dto.req.FourInOneRequestDTO; import com.volvo.ai.analytic.center.dto.req.FourInOneRequestDTO;
@@ -9,9 +8,7 @@ import com.volvo.ai.analytic.center.dto.req.RunMaskingRuleInput;
import com.volvo.ai.analytic.center.entity.AiAnalysisErrors; import com.volvo.ai.analytic.center.entity.AiAnalysisErrors;
import com.volvo.ai.analytic.center.entity.AiAnalysisRequestLogs; import com.volvo.ai.analytic.center.entity.AiAnalysisRequestLogs;
import com.volvo.ai.analytic.center.entity.DataMaskingRule; import com.volvo.ai.analytic.center.entity.DataMaskingRule;
import com.volvo.ai.analytic.center.entity.TcIntelligentCustomer;
import com.volvo.ai.analytic.center.enums.BusinessTypeEnum; import com.volvo.ai.analytic.center.enums.BusinessTypeEnum;
import com.volvo.ai.analytic.center.enums.IntelligentCustomerTypeEnum;
import com.volvo.ai.analytic.center.feign.RemoteCarModelClient; import com.volvo.ai.analytic.center.feign.RemoteCarModelClient;
import com.volvo.ai.analytic.center.mapper.AiAnalysisErrorsMapper; import com.volvo.ai.analytic.center.mapper.AiAnalysisErrorsMapper;
import com.volvo.ai.analytic.center.mapper.TcIntelligentCustomerMapper; import com.volvo.ai.analytic.center.mapper.TcIntelligentCustomerMapper;
@@ -19,6 +16,7 @@ import com.volvo.ai.analytic.center.service.*;
import com.volvo.ai.analytic.center.utils.AiAnalysisUtils; import com.volvo.ai.analytic.center.utils.AiAnalysisUtils;
import com.volvo.ai.analytic.center.utils.ConstantStr; import com.volvo.ai.analytic.center.utils.ConstantStr;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.rocketmq.client.producer.SendCallback; import org.apache.rocketmq.client.producer.SendCallback;
import org.apache.rocketmq.client.producer.SendResult; import org.apache.rocketmq.client.producer.SendResult;
@@ -34,7 +32,6 @@ import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
@@ -110,7 +107,7 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
try { try {
JSONObject outputsJson = execDifyFlow.getJSONObject("outputs"); JSONObject outputsJson = execDifyFlow.getJSONObject("outputs");
// 发送MQ // 发送MQ
String message = JSONObject.toJSONString(outputsJson); String message = StringEscapeUtils.unescapeJava(JSONObject.toJSONString(outputsJson));
log.info("send mq {}",message); log.info("send mq {}",message);
sendMq(message); sendMq(message);
@@ -146,7 +143,7 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
} }
// 咨询类【201】/投诉类【202】/投诉类型【203】 过滤 // 咨询类【201】/投诉类【202】/投诉类型【203】 过滤
private String fourInOneMqServiceFilter(String customerType,String customerValue){ /** private String fourInOneMqServiceFilter(String customerType,String customerValue){
if(tcIntelligentCustomer.isEmpty()){ if(tcIntelligentCustomer.isEmpty()){
queryTcIntelligentCustomer(); queryTcIntelligentCustomer();
} }
@@ -178,6 +175,6 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic
)); ));
return tcIntelligentCustomer; return tcIntelligentCustomer;
} }
**/
} }