diff --git a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java index b339095485..e26266b470 100644 --- a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -215,18 +215,11 @@ public class NoticeService { } catch (Exception e) { task = new MessageTask(); - List columns = ReflexObjectUtil.getColumns(task, SystemReference.messageColumns); - OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), null, - StatusReference.statusMap.containsKey(task.getTaskType()) ? StatusReference.statusMap.get(task.getTaskType()) : task.getTaskType(), task.getUserId(), columns); - return JSON.toJSONString(details); } } - if (task != null) { - List columns = ReflexObjectUtil.getColumns(task, SystemReference.messageColumns); - OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), null, - StatusReference.statusMap.containsKey(task.getTaskType()) ? StatusReference.statusMap.get(task.getTaskType()) : task.getTaskType(), task.getUserId(), columns); - return JSON.toJSONString(details); - } - return null; + List columns = ReflexObjectUtil.getColumns(task, SystemReference.messageColumns); + OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), null, + StatusReference.statusMap.containsKey(task.getTaskType()) ? StatusReference.statusMap.get(task.getTaskType()) : task.getTaskType(), null, columns); + return JSON.toJSONString(details); } }