From d35d135478b0bf63689946acfa3b37b793f571ad Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 16 Mar 2021 13:53:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E6=B5=8B=E8=AF=95=E6=97=B6?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E7=9B=B8=E5=85=B3=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/service/PerformanceTestService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java index 1100f9dba3..6a73af82b5 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -238,9 +238,11 @@ public class PerformanceTestService { // 相减 List 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 addFileIds = ListUtils.subtract(updatedFileIds, originFileIds);