修改语料返回结果
This commit is contained in:
@@ -17,11 +17,11 @@ import java.util.Date;
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Data
|
||||
@TableName("tm_corpus_report")
|
||||
@TableName("tm_analysis_result")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TmCorpusReport {
|
||||
public class TmAnalysisResult {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -40,44 +40,15 @@ public class TmCorpusReport {
|
||||
/**
|
||||
* 语料类型【1:企业微信,2:电话】
|
||||
*/
|
||||
@TableField("corpus_type")
|
||||
private Long corpusType;
|
||||
@TableField("analysis_type")
|
||||
private String analysisType;
|
||||
|
||||
/**
|
||||
* corpus_time
|
||||
*/
|
||||
@TableField("corpus_time")
|
||||
private Date corpusTime;
|
||||
@TableField("analysis_result")
|
||||
private String analysisResult;
|
||||
|
||||
/**
|
||||
* union_id
|
||||
*/
|
||||
@TableField("union_id")
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* user_id
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 报告标题
|
||||
*/
|
||||
@TableField("report_title")
|
||||
private String reportTitle;
|
||||
|
||||
/**
|
||||
* 报告详情
|
||||
*/
|
||||
@TableField("report_info")
|
||||
private String reportInfo;
|
||||
|
||||
/**
|
||||
* 点踩点赞(1:点赞,2-点踩)
|
||||
*/
|
||||
@TableField("is_like")
|
||||
private Integer isLike;
|
||||
|
||||
/**
|
||||
* 删除标识(0-未删除,1-已删除)
|
||||
@@ -213,7 +213,7 @@ public class TmOdsVdqwMessagearchivingServiceImpl extends ServiceImpl<TmOdsVdqwM
|
||||
ltoMap.put("unionId", unionId);
|
||||
ltoMap.put("consultantId", userId);
|
||||
ltoMap.put("communicateDate", DateUtil.format(maxMsgTimeItem.getMsgTime(), DatePattern.NORM_DATETIME_PATTERN));
|
||||
ltoMap.put("analysisResult", resultStrOne.replace("#",""));
|
||||
ltoMap.put("analysisResult", resultStrOne);
|
||||
ltoMap.put("analysisDetail", resultStrTwo);
|
||||
// 发送MQ
|
||||
log.info("send mq {}", ltoMap);
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.volvo.ai.analytic.center.entity.DataMaskingRule;
|
||||
import com.volvo.ai.analytic.center.entity.TmTelephoneCorpus;
|
||||
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.RemoteCarModelClient;
|
||||
import com.volvo.ai.analytic.center.mapper.TmTelephoneCorpusMapper;
|
||||
import com.volvo.ai.analytic.center.service.AiAnalysisRequestLogsService;
|
||||
@@ -159,12 +158,12 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
|
||||
// ltoMap.put("unionId", aicorpusTelephone.getSourceId());
|
||||
ltoMap.put("recordId", aicorpusTelephone.getSourceId());
|
||||
ltoMap.put("communicateDate", formattedDateStartTime);
|
||||
ltoMap.put("analysisResult", resultStrOne.replace("#",""));
|
||||
ltoMap.put("analysisResult", resultStrOne);
|
||||
ltoMap.put("analysisDetail", resultStrTwo);
|
||||
// 发送MQ
|
||||
|
||||
log.info("send mq {}",ltoMap);
|
||||
sendMq( CategoryEnum.PHONE_VOICE.getCode(), JSONObject.toJSONString(ltoMap));
|
||||
// sendMq( CategoryEnum.PHONE_VOICE.getCode(), JSONObject.toJSONString(ltoMap));
|
||||
try {
|
||||
aiAnalysisRequestLogsService.saveAiAnalysisRequestLogs(AiAnalysisRequestLogs.builder().aiAnalysisRequestId(execDifyFlow.getString("aiAnalysisRequestId")).businessResponse(JSONObject.toJSONString(ltoMap)).build());
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ public class FlowResultSplitUtil {
|
||||
if (endIndex == -1) {
|
||||
return "" ;
|
||||
}
|
||||
|
||||
return text.substring(startIndex, endIndex).trim();
|
||||
String result = text.substring(startIndex + startMark.length()+1, endIndex);
|
||||
result = result.replace("#","");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user