fix(接口定义): 修复删除jar包还能引用到jar包内容的缺陷
--bug=1023186 --user=王孝刚 【接口测试】文件管理中删除jar包后,还能引用到jar包的内容 https://www.tapd.cn/55049933/s/1336737
This commit is contained in:
parent
7933c62159
commit
cfa51c7a91
|
@ -63,8 +63,8 @@ public class NewDriverManager {
|
|||
|
||||
FileMetadataService fileMetadataService = CommonBeanFactory.getBean(FileMetadataService.class);
|
||||
map.forEach((key, value) -> {
|
||||
loaderProjectIds.add(key);
|
||||
if (CollectionUtils.isNotEmpty(value)) {
|
||||
loaderProjectIds.add(key);
|
||||
//历史数据
|
||||
value.stream().distinct().filter(s -> s.isHasFile()).forEach(s -> {
|
||||
//获取文件内容
|
||||
|
|
|
@ -35,13 +35,16 @@ public class JarConfigUtils {
|
|||
.stream()
|
||||
.map(ProjectJarConfig::getId)
|
||||
.collect(Collectors.toList()).contains(nodeFile)).collect(Collectors.toList());
|
||||
expiredJar.forEach(jar
|
||||
-> deleteDir(StringUtils.join(
|
||||
localPath,
|
||||
File.separator,
|
||||
item,
|
||||
File.separator,
|
||||
jar)));
|
||||
if (CollectionUtils.isNotEmpty(expiredJar)) {
|
||||
expiredJar.forEach(jar
|
||||
-> deleteDir(StringUtils.join(
|
||||
localPath,
|
||||
File.separator,
|
||||
item,
|
||||
File.separator,
|
||||
jar)));
|
||||
jarConfigsMap.put(item, new ArrayList<>());
|
||||
}
|
||||
projectJarConfigs.forEach(projectJarConfig -> {
|
||||
if (CollectionUtils.isNotEmpty(nodeFiles)) {
|
||||
nodeFiles.forEach(refId -> {
|
||||
|
@ -59,15 +62,18 @@ public class JarConfigUtils {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
//本地完全没有jar包 需要下载
|
||||
jarConfigs.add(projectJarConfig);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//本地没有文件,需要从服务器下载
|
||||
//项目级别的目录都不存在,需要从服务器下载
|
||||
jarConfigs.add(projectJarConfig);
|
||||
}
|
||||
jarConfigsMap.put(item, jarConfigs);
|
||||
if (CollectionUtils.isNotEmpty(jarConfigs)) {
|
||||
jarConfigsMap.put(item, jarConfigs);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue