From 535fe09741fd2849d85c0da1cf18f51d8f165eae Mon Sep 17 00:00:00 2001 From: opensnail <598092184@qq.com> Date: Sun, 21 Apr 2024 09:48:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(sj=5F1.0.0):=20=E5=AE=8C=E6=88=90=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/service/impl/NotifyRecipientServiceImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/snail-job-server/snail-job-server-web/src/main/java/com/aizuda/snailjob/server/web/service/impl/NotifyRecipientServiceImpl.java b/snail-job-server/snail-job-server-web/src/main/java/com/aizuda/snailjob/server/web/service/impl/NotifyRecipientServiceImpl.java index 7911c84f..486fb936 100644 --- a/snail-job-server/snail-job-server-web/src/main/java/com/aizuda/snailjob/server/web/service/impl/NotifyRecipientServiceImpl.java +++ b/snail-job-server/snail-job-server-web/src/main/java/com/aizuda/snailjob/server/web/service/impl/NotifyRecipientServiceImpl.java @@ -8,6 +8,7 @@ import com.aizuda.snailjob.server.web.model.response.CommonLabelValueResponseVO; import com.aizuda.snailjob.server.web.model.response.NotifyRecipientResponseVO; import com.aizuda.snailjob.server.web.service.NotifyRecipientService; import com.aizuda.snailjob.server.web.service.convert.NotifyRecipientConverter; +import com.aizuda.snailjob.server.web.util.UserSessionUtils; import com.aizuda.snailjob.template.datasource.persistence.mapper.NotifyRecipientMapper; import com.aizuda.snailjob.template.datasource.persistence.po.NotifyRecipient; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -48,12 +49,18 @@ public class NotifyRecipientServiceImpl implements NotifyRecipientService { @Override public Boolean saveNotifyRecipient(NotifyRecipientRequestVO requestVO) { - return 1 == notifyRecipientMapper.insert(NotifyRecipientConverter.INSTANCE.toNotifyRecipient(requestVO)); + String namespaceId = UserSessionUtils.currentUserSession().getNamespaceId(); + NotifyRecipient notifyRecipient = NotifyRecipientConverter.INSTANCE.toNotifyRecipient(requestVO); + notifyRecipient.setNamespaceId(namespaceId); + return 1 == notifyRecipientMapper.insert(notifyRecipient); } @Override public Boolean updateNotifyRecipient(NotifyRecipientRequestVO requestVO) { - return 1 == notifyRecipientMapper.updateById(NotifyRecipientConverter.INSTANCE.toNotifyRecipient(requestVO)); + String namespaceId = UserSessionUtils.currentUserSession().getNamespaceId(); + NotifyRecipient notifyRecipient = NotifyRecipientConverter.INSTANCE.toNotifyRecipient(requestVO); + notifyRecipient.setNamespaceId(namespaceId); + return 1 == notifyRecipientMapper.updateById(notifyRecipient); } @Override