加上try

This commit is contained in:
ZLI263
2025-09-22 20:41:58 +08:00
parent 2a34323c51
commit 8a900950fe

View File

@@ -107,7 +107,7 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
@Override
public void runTelephoneCorpusDify(AicorpusTelephoneDTO aicorpusTelephone) {
try {
if (null != aicorpusTelephone) {
List<DataMaskingRule> maskingRuleItems = dataMaskingRuleService.getDataMaskingRuleListByApplicationChannel(BusinessTypeEnum.SMART_ASSISTANT.getCode());
@@ -119,8 +119,6 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
DiFyReq diFyImageReq = new DiFyReq();
diFyImageReq.setUser(ConstantStr.corpus_user);
diFyImageReq.setFlowId(telephoneToken);
JSONObject jsonObject = JSONObject.parseObject(aicorpusTelephone.getDisplay());
JSONArray segments = jsonObject.getJSONArray("segments");
Long audioDuration = jsonObject.getLong("audio_duration"); // 毫秒
@@ -218,6 +216,9 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
log.info("第二个业务场景dcc用户画像执行时间: {} ms", (endTime2 - startTime2));
//第二个业务场景, 结束
}
} catch (Exception e) {
log.error("dify 异常", e);
}
}