|
|
|
@ -311,22 +311,4 @@ public class AskServiceImpl implements AskService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getAnswerMessageOrDefault(String fileResourceId) {
|
|
|
|
|
if (StrUtil.isBlank(fileResourceId)) {
|
|
|
|
|
fileResourceId = defaultNoMatchId;
|
|
|
|
|
}
|
|
|
|
|
FileResource fileResource = fileResourceService.getById(fileResourceId);
|
|
|
|
|
if (ObjectUtil.isEmpty(fileResource)) {
|
|
|
|
|
log.info("未找到视频,走默认视频");
|
|
|
|
|
fileResource = fileResourceService.getById(defaultNoMatchId);
|
|
|
|
|
}
|
|
|
|
|
try (InputStream inputStream = MinioUtil.download(fileResource.getMinioId())) {
|
|
|
|
|
return Base64Encoder.encode(IoUtil.readBytes(inputStream));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("获取视频失败", e);
|
|
|
|
|
throw new BusinessException("未找到回复视频");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|