异常发送空MQ
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.volvo.ai.analytic.center.enums;
|
||||
|
||||
public enum StatusEnums {
|
||||
|
||||
success(200, "分析完成"),
|
||||
error(500, "系统异常,请稍后重试"),
|
||||
;
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
StatusEnums(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.volvo.ai.analytic.center.dto.req.RunMaskingRuleInput;
|
||||
import com.volvo.ai.analytic.center.entity.*;
|
||||
import com.volvo.ai.analytic.center.enums.BusinessTypeEnum;
|
||||
import com.volvo.ai.analytic.center.enums.ClaimVerificationFileTypeEnums;
|
||||
import com.volvo.ai.analytic.center.enums.StatusEnums;
|
||||
import com.volvo.ai.analytic.center.mapper.AiAnalysisErrorsMapper;
|
||||
import com.volvo.ai.analytic.center.mapper.AiAnalyticWarrantyAuditMapper;
|
||||
import com.volvo.ai.analytic.center.service.DataMaskingRuleService;
|
||||
@@ -183,11 +184,22 @@ public class ClaimVerificationServiceImpl implements ClaimVerificationService {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("售后索赔检核异常:{}", e.getMessage());
|
||||
//推送空的回调MQ
|
||||
sendErrorCallBack(claimVerificationFileAnalysisDTO, aiAnalysisRequestId);
|
||||
//保存错误日志
|
||||
saveException(e.getMessage(), aiAnalysisRequestId, diFyObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendErrorCallBack(ClaimVerificationFileDTO claimVerificationFileAnalysisDTO, String aiAnalysisRequestId) {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("newBieAfterSalesId", claimVerificationFileAnalysisDTO.getNewBieAfterSalesId());
|
||||
data.put("businessType", claimVerificationFileAnalysisDTO.getBusinessType());
|
||||
data.put("aiAnalysisRequestId", aiAnalysisRequestId);
|
||||
log.info("索赔检核发送异常空MQMQ: {}", data.toString());
|
||||
rocketMQTemplate.syncSend(topic, data);
|
||||
}
|
||||
|
||||
@Async
|
||||
protected void syncUpdateDiFyRequest(String difyQuery, String aiAnalysisRequestId) {
|
||||
aiAnalysisRequestLogsMapper.update(new AiAnalysisRequestLogs(),
|
||||
|
||||
Reference in New Issue
Block a user