refactor(性能测试): 性能测试下载zip使用流下载,兼容1.20升级上来的数据

This commit is contained in:
CaptainB 2024-01-23 13:51:55 +08:00
parent f43a61f996
commit a580bd0a9e
1 changed files with 2 additions and 1 deletions

View File

@ -192,7 +192,8 @@ public class EngineFactory {
if (CollectionUtils.isNotEmpty(resourceFiles)) {
resourceFiles.forEach(cf -> {
InputStream in = fileMetadataService.getFileAsStream(cf.getId());
if (in == null) {
// 兼容1.20之前的版本
if (cf.getStorage() == null) {
byte[] bytes = fileMetadataService.loadFileAsBytes(cf.getId());
in = new ByteArrayInputStream(bytes);
}