From 2c2f8b847617047b33f98d6259cba638efad4de6 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 5 Jan 2021 16:29:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/ApiDefinitionExecResultService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index 362781a4cf..10ca968510 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -14,6 +14,7 @@ import io.metersphere.track.service.TestPlanApiCaseService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.List; @@ -60,6 +61,9 @@ public class ApiDefinitionExecResultService { } public void deleteByResourceIds(List ids) { + if (CollectionUtils.isEmpty(ids)) { + return; + } ApiDefinitionExecResultExample example = new ApiDefinitionExecResultExample(); example.createCriteria().andResourceIdIn(ids); apiDefinitionExecResultMapper.deleteByExample(example);