Skip to content

Commit 1683278

Browse files
committed
CLAP-483 Feat: 구분 수정시 이름 중복 검증 logic 추가
1 parent 0b1f0cb commit 1683278

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/java/clap/server/application/service/label/ManageLabelService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public void editLabel(Long adminId, Long labelId, EditLabelRequest request) {
2929
Label label = loadLabelPort.findById(labelId)
3030
.orElseThrow(() -> new ApplicationException(LabelErrorCode.LABEL_NOT_FOUND));
3131

32+
loadLabelPort.existsByLabelName(request.labelName());
33+
3234
label.updateLabel(request);
3335
commandLabelPort.save(label);
3436
}

src/main/java/clap/server/application/service/notification/CountNotificationService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import clap.server.adapter.inbound.web.dto.notification.response.CountNotificationResponse;
44
import clap.server.application.mapper.response.NotificationResponseMapper;
5+
import clap.server.application.port.inbound.domain.MemberService;
56
import clap.server.application.port.inbound.notification.CountNotificationUseCase;
67
import clap.server.application.port.outbound.notification.LoadNotificationPort;
78
import clap.server.common.annotation.architecture.ApplicationService;
@@ -13,11 +14,14 @@
1314
@RequiredArgsConstructor
1415
public class CountNotificationService implements CountNotificationUseCase {
1516

17+
private final MemberService memberService;
1618
private final LoadNotificationPort loadNotificationPort;
1719

1820
@Transactional
1921
@Override
2022
public CountNotificationResponse countNotification(Long memberId) {
23+
24+
memberService.findActiveMember(memberId);
2125
Integer count = loadNotificationPort.countNotification(memberId);
2226

2327
return NotificationResponseMapper.toCountNotificationResponse(memberId, count);

0 commit comments

Comments
 (0)