fix(性能测试): 修复编辑测试时删除不相关的文件报错

This commit is contained in:
Captain.B 2021-03-16 13:53:48 +08:00
parent 7fe6b3660d
commit d35d135478
1 changed files with 5 additions and 3 deletions

View File

@ -238,9 +238,11 @@ public class PerformanceTestService {
// 相减
List<String> deleteFileIds = ListUtils.subtract(originFileIds, updatedFileIds);
// 删除已经不相关的文件
LoadTestFileExample example3 = new LoadTestFileExample();
example3.createCriteria().andFileIdIn(deleteFileIds);
loadTestFileMapper.deleteByExample(example3);
if (!CollectionUtils.isEmpty(deleteFileIds)) {
LoadTestFileExample example3 = new LoadTestFileExample();
example3.createCriteria().andFileIdIn(deleteFileIds);
loadTestFileMapper.deleteByExample(example3);
}
// 导入项目里其他的文件
List<String> addFileIds = ListUtils.subtract(updatedFileIds, originFileIds);