fix(接口定义): 修复case关联文件库文件报空指针的缺陷

This commit is contained in:
wxg0103 2023-01-06 10:18:48 +08:00 committed by wxg0103
parent e48580810a
commit a2d6b1b595
1 changed files with 4 additions and 2 deletions

View File

@ -50,8 +50,10 @@ public class ApiFileUtil extends FileUtils {
if (fileManagerService == null) { if (fileManagerService == null) {
fileManagerService = CommonBeanFactory.getBean(FileManagerService.class); fileManagerService = CommonBeanFactory.getBean(FileManagerService.class);
} }
for (MultipartFile bodyFile : bodyFiles) { if (CollectionUtils.isNotEmpty(bodyFiles) && StringUtils.isNotBlank(requestId)) {
fileManagerService.upload(bodyFile, getRequest(requestId)); for (MultipartFile bodyFile : bodyFiles) {
fileManagerService.upload(bodyFile, getRequest(requestId));
}
} }
} }