From 1683278ab6921f423be77c4399f62da732a690ea Mon Sep 17 00:00:00 2001 From: andrew Date: Wed, 19 Feb 2025 13:57:41 +0900 Subject: [PATCH] =?UTF-8?q?CLAP-483=20Feat:=20=EA=B5=AC=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=8B=9C=20=EC=9D=B4=EB=A6=84=20=EC=A4=91?= =?UTF-8?q?=EB=B3=B5=20=EA=B2=80=EC=A6=9D=20logic=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/application/service/label/ManageLabelService.java | 2 ++ .../service/notification/CountNotificationService.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/clap/server/application/service/label/ManageLabelService.java b/src/main/java/clap/server/application/service/label/ManageLabelService.java index 6a6b55cb..91298d8e 100644 --- a/src/main/java/clap/server/application/service/label/ManageLabelService.java +++ b/src/main/java/clap/server/application/service/label/ManageLabelService.java @@ -29,6 +29,8 @@ public void editLabel(Long adminId, Long labelId, EditLabelRequest request) { Label label = loadLabelPort.findById(labelId) .orElseThrow(() -> new ApplicationException(LabelErrorCode.LABEL_NOT_FOUND)); + loadLabelPort.existsByLabelName(request.labelName()); + label.updateLabel(request); commandLabelPort.save(label); } diff --git a/src/main/java/clap/server/application/service/notification/CountNotificationService.java b/src/main/java/clap/server/application/service/notification/CountNotificationService.java index 6b967d83..25c18c64 100644 --- a/src/main/java/clap/server/application/service/notification/CountNotificationService.java +++ b/src/main/java/clap/server/application/service/notification/CountNotificationService.java @@ -2,6 +2,7 @@ import clap.server.adapter.inbound.web.dto.notification.response.CountNotificationResponse; import clap.server.application.mapper.response.NotificationResponseMapper; +import clap.server.application.port.inbound.domain.MemberService; import clap.server.application.port.inbound.notification.CountNotificationUseCase; import clap.server.application.port.outbound.notification.LoadNotificationPort; import clap.server.common.annotation.architecture.ApplicationService; @@ -13,11 +14,14 @@ @RequiredArgsConstructor public class CountNotificationService implements CountNotificationUseCase { + private final MemberService memberService; private final LoadNotificationPort loadNotificationPort; @Transactional @Override public CountNotificationResponse countNotification(Long memberId) { + + memberService.findActiveMember(memberId); Integer count = loadNotificationPort.countNotification(memberId); return NotificationResponseMapper.toCountNotificationResponse(memberId, count);