From 92b806599ded73f9d893c842925689cced63dd68 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 24 May 2024 15:05:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E5=88=9B=E5=BB=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1040953 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001040953 --- .../system/notice/sender/SendNoticeAspect.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java index 1ef69a9f6b..12e8b446d7 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java @@ -45,6 +45,11 @@ public class SendNoticeAspect { private final static String ID = "id"; private final static String PROJECT_ID = "projectId"; private final static String CREATE_USER = "createUser"; + private final static String CREATE_TIME = "createTime"; + private final static String UPDATE_TIME = "updateTime"; + private final static String UPDATE_USER = "updateUser"; + + @Pointcut("@annotation(io.metersphere.system.notice.annotation.SendNotice)") public void pointcut() { @@ -168,6 +173,15 @@ public class SendNoticeAspect { if (object.containsKey(CREATE_USER) && resource.get(CREATE_USER) == null) { resource.put(CREATE_USER, object.get(CREATE_USER)); } + if (object.containsKey(CREATE_TIME) && resource.get(CREATE_TIME) == null) { + resource.put(CREATE_TIME, object.get(CREATE_TIME)); + } + if (object.containsKey(UPDATE_TIME) && resource.get(UPDATE_TIME) == null) { + resource.put(UPDATE_TIME, object.get(UPDATE_TIME)); + } + if (object.containsKey(UPDATE_USER) && resource.get(UPDATE_USER) == null) { + resource.put(UPDATE_USER, object.get(UPDATE_USER)); + } } } commonNoticeSendService.sendNotice(taskType, event, resources, sessionUser, currentProjectId);