chore: 去掉不用的类

This commit is contained in:
CaptainB 2023-05-31 10:32:31 +08:00
parent 378d70faa6
commit cff497fae5
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
package io.metersphere.metadata.service; package io.metersphere.metadata.service;
import com.alibaba.nacos.common.utils.ByteUtils;
import io.metersphere.base.domain.*; import io.metersphere.base.domain.*;
import io.metersphere.base.mapper.FileAssociationMapper; import io.metersphere.base.mapper.FileAssociationMapper;
import io.metersphere.base.mapper.FileContentMapper; import io.metersphere.base.mapper.FileContentMapper;
@ -265,7 +265,7 @@ public class FileMetadataService {
if (StringUtils.isEmpty(fileMetadata.getStorage()) && StringUtils.isEmpty(fileMetadata.getResourceType())) { if (StringUtils.isEmpty(fileMetadata.getStorage()) && StringUtils.isEmpty(fileMetadata.getResourceType())) {
bytes = getContent(fileMetadata.getId()); bytes = getContent(fileMetadata.getId());
} }
if (ByteUtils.isEmpty(bytes)) { if (bytes == null || bytes.length == 0) {
FileRequest request = new FileRequest(fileMetadata.getProjectId(), fileMetadata.getName(), fileMetadata.getType()); FileRequest request = new FileRequest(fileMetadata.getProjectId(), fileMetadata.getName(), fileMetadata.getType());
request.setResourceType(fileMetadata.getResourceType()); request.setResourceType(fileMetadata.getResourceType());
request.setPath(fileMetadata.getPath()); request.setPath(fileMetadata.getPath());