diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java index f0f34d53d5..eda4ac3b98 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java @@ -99,6 +99,9 @@ public abstract class AbstractNoticeSender implements NoticeSender { Map jsonObject = new BeanMap(o); String id = (String) jsonObject.get("id"); CustomField customField = baseCustomFieldService.get(id); + if (customField == null) { + continue; + } Object value = jsonObject.get("value"); if (value instanceof String && StringUtils.isNotEmpty((String) value)) { String v = StringUtils.unwrap((String) value, "\""); @@ -143,6 +146,9 @@ public abstract class AbstractNoticeSender implements NoticeSender { } protected List getUserDetails(List userIds) { + if (CollectionUtils.isEmpty(userIds)) { + return new ArrayList<>(); + } return baseUserMapper.queryTypeByIds(userIds); }