-
Notifications
You must be signed in to change notification settings - Fork 2
[REFACTOR] member 모듈 분리 #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
667d985
941c2e5
55cc7cb
5adb3e0
0123b1f
b362622
193d4ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # 🚩 Jira Ticket | ||
| [SCRUM-] | ||
| # 🚩 Issue | ||
| closed # | ||
|
|
||
| # 🗣️ 리뷰 요구사항 (선택) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ plugins { | |
|
|
||
| dependencies { | ||
| implementation project(':domain') | ||
| implementation project(':domain-member') | ||
| implementation project(':infra-redis') | ||
| implementation project(':infra-kafka') | ||
|
|
||
|
|
@@ -12,5 +13,6 @@ dependencies { | |
| implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
|
|
||
| testImplementation(testFixtures(project(':domain'))) | ||
| testImplementation(testFixtures(project(':domain-member'))) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line adds test fixtures for the If the test fixtures are not required, removing them will simplify the build configuration and reduce potential conflicts. |
||
| testImplementation 'io.rest-assured:rest-assured' | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,11 +1,16 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| package com.wellmeet.reservation; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.domain.member.MemberDomainService; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.domain.member.entity.Member; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.domain.reservation.ReservationDomainService; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.domain.reservation.entity.Reservation; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.global.event.EventPublishService; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.global.event.event.ReservationConfirmedEvent; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.wellmeet.reservation.dto.ReservationResponse; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import java.util.List; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import java.util.Map; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import java.util.function.Function; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import java.util.stream.Collectors; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import lombok.RequiredArgsConstructor; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import org.springframework.stereotype.Service; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import org.springframework.transaction.annotation.Transactional; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -15,13 +20,34 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public class ReservationService { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private final ReservationDomainService reservationDomainService; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private final MemberDomainService memberDomainService; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private final EventPublishService eventPublishService; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @Transactional(readOnly = true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public List<ReservationResponse> getReservations(String restaurantId) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return reservationDomainService.findAllByRestaurantId(restaurantId) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .stream() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .map(ReservationResponse::new) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| List<Reservation> reservations = reservationDomainService.findAllByRestaurantId(restaurantId); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (reservations.isEmpty()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return List.of(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| List<String> memberIds = reservations.stream() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .map(Reservation::getMemberId) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .distinct() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .toList(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Map<String, Member> membersById = memberDomainService.findAllByIds(memberIds).stream() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .collect(Collectors.toMap(Member::getId, Function.identity())); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return reservations.stream() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .map(reservation -> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member member = membersById.get(reservation.getMemberId()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return new ReservationResponse( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reservation, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| member.getName(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| member.getPhone(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| member.getEmail(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| member.isVip() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member member = membersById.get(reservation.getMemberId());
if (member == null) {
throw new IllegalStateException("ID에 해당하는 회원을 찾을 수 없습니다: " + reservation.getMemberId());
}
return new ReservationResponse(
reservation,
member.getName(),
member.getPhone(),
member.getEmail(),
member.isVip()
); |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .toList(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+40
to
51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 회원 정보가 없는 경우에 대한 null 처리가 필요합니다. Line 42에서 데이터 정합성이 보장된다면 발생하지 않을 수 있지만, 방어적 프로그래밍을 위해 null 체크를 추가하는 것을 권장합니다. 다음과 같이 개선할 수 있습니다: return reservations.stream()
.map(reservation -> {
Member member = membersById.get(reservation.getMemberId());
+ if (member == null) {
+ throw new IllegalStateException("Member not found for reservation: " + reservation.getId());
+ }
return new ReservationResponse(
reservation,
member.getName(),
member.getPhone(),
member.getEmail(),
member.isVip()
);
})
.toList();또는 null인 경우를 필터링하여 제외: return reservations.stream()
+ .map(reservation -> {
+ Member member = membersById.get(reservation.getMemberId());
+ if (member == null) {
+ return null;
+ }
+ return new ReservationResponse(
+ reservation,
+ member.getName(),
+ member.getPhone(),
+ member.getEmail(),
+ member.isVip()
+ );
+ })
+ .filter(Objects::nonNull)
- .map(reservation -> {
- Member member = membersById.get(reservation.getMemberId());
- return new ReservationResponse(
- reservation,
- member.getName(),
- member.getPhone(),
- member.getEmail(),
- member.isVip()
- );
- })
.toList();📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -30,7 +56,8 @@ public void confirmReservation(Long reservationId) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Reservation reservation = reservationDomainService.getById(reservationId); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reservation.confirm(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ReservationConfirmedEvent event = new ReservationConfirmedEvent(reservation); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member member = memberDomainService.getById(reservation.getMemberId()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ReservationConfirmedEvent event = new ReservationConfirmedEvent(reservation, member.getName()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Also, verify that the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| eventPublishService.publishReservationConfirmedEvent(event); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| import static org.mockito.Mockito.verify; | ||
| import static org.mockito.Mockito.when; | ||
|
|
||
| import com.wellmeet.domain.member.MemberDomainService; | ||
| import com.wellmeet.domain.member.entity.Member; | ||
| import com.wellmeet.domain.owner.entity.Owner; | ||
| import com.wellmeet.domain.reservation.ReservationDomainService; | ||
|
|
@@ -29,6 +30,9 @@ class ReservationServiceTest { | |
| @Mock | ||
| private ReservationDomainService reservationDomainService; | ||
|
|
||
| @Mock | ||
| private MemberDomainService memberDomainService; | ||
|
|
||
| @Mock | ||
| private EventPublishService eventPublishService; | ||
|
|
||
|
|
@@ -50,6 +54,9 @@ class GetReservations { | |
|
|
||
| when(reservationDomainService.findAllByRestaurantId(restaurant.getId())) | ||
| .thenReturn(reservations); | ||
| when(memberDomainService.findAllByIds(List.of(member1.getId(), member2.getId()))) | ||
| .thenReturn(List.of(member1, member2)); | ||
|
|
||
|
Comment on lines
+57
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainnull memberId로 인한 의미 없는 검증 가능성 — ID를 명시적으로 세팅하세요 현재 Member를 new로 생성해 getId()가 null일 가능성이 높습니다. 그 결과:
테스트 신뢰도를 위해 멤버 ID를 고정 값으로 주입하고, 스터빙은 순서에 비의존하게 처리하세요. 아래와 같이 수정 제안합니다. @@
-import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
@@
import java.time.LocalDateTime;
import java.util.List;
+import org.springframework.test.util.ReflectionTestUtils;
@@
- when(memberDomainService.findAllByIds(List.of(member1.getId(), member2.getId())))
- .thenReturn(List.of(member1, member2));
+ when(memberDomainService.findAllByIds(
+ argThat(ids -> ids != null
+ && ids.containsAll(List.of(member1.getId(), member2.getId()))
+ && ids.size() == 2)))
+ .thenReturn(List.of(member1, member2));
@@
- private Member createMember(String name) {
- return new Member(name, "nickname", "email@email.com", "phone");
- }
+ private Member createMember(String name) {
+ Member member = new Member(name, "nickname", "email@email.com", "phone");
+ // 테스트용 결정적 ID 주입
+ ReflectionTestUtils.setField(member, "id", name + "-id");
+ return member;
+ }추가로, getReservations 검증을 단순 size 비교에서 DTO 필드(예: memberId, memberName 등)까지 포함하도록 보강해 주세요. 다음 스크립트로 Member 엔티티의 id 필드 존재/타입을 확인해 주세요. ReflectionTestUtils 사용 가능 여부도 함께 탐색합니다. Also applies to: 103-103 🏁 Script executed: #!/bin/bash
# Member 엔티티 id 필드 확인
fd -a 'Member.java' | xargs -I {} rg -nP 'class\s+Member\b|^\s*private\s+(String|Long|UUID)\s+id\s*;' -n --context 2 {}
# ReflectionTestUtils 사용 여부(프로젝트 내 선행 사용 사례 탐색)
rg -n 'ReflectionTestUtils' -g 'src/**/test/**'Length of output: 382 🏁 Script executed: #!/bin/bash
# ReservationServiceTest.java 전체 확인
fd -a 'ReservationServiceTest.java' -type f
# 찾은 파일의 내용 확인
fd -a 'ReservationServiceTest.java' -type f -exec cat {} \;Length of output: 341 🏁 Script executed: #!/bin/bash
# Reservation 클래스 구조 확인
fd -a 'Reservation.java' -type f | grep -v Test | xargs -I {} cat {}Length of output: 170 🏁 Script executed: #!/bin/bash
# BaseEntity 확인
fd -a 'BaseEntity.java' -type f | xargs -I {} cat {}Length of output: 170 🏁 Script executed: #!/bin/bash
# ReservationServiceTest.java 찾기 및 출력
fd 'ReservationServiceTest\.java$' -exec cat {} \;Length of output: 187 🏁 Script executed: #!/bin/bash
# Reservation.java 찾기 및 출력 (Test 제외)
fd 'Reservation\.java$' -not -path '*/test/*' -exec cat {} \;Length of output: 230 🏁 Script executed: #!/bin/bash
# BaseEntity.java 찾기 및 출력
fd 'BaseEntity\.java$' -exec cat {} \;Length of output: 187 |
||
| List<ReservationResponse> expectedReservations = reservationService.getReservations(restaurant.getId()); | ||
|
|
||
| assertThat(expectedReservations).hasSize(reservations.size()); | ||
|
|
@@ -68,6 +75,8 @@ class ConfirmReservation { | |
|
|
||
| when(reservationDomainService.getById(reservation.getId())) | ||
| .thenReturn(reservation); | ||
| when(memberDomainService.getById(member.getId())) | ||
| .thenReturn(member); | ||
|
|
||
| reservationService.confirmReservation(reservation.getId()); | ||
|
|
||
|
|
@@ -91,6 +100,6 @@ private Member createMember(String name) { | |
|
|
||
| private Reservation createReservation(Restaurant restaurant, AvailableDate availableDate, Member member, | ||
| int partySize) { | ||
| return new Reservation(restaurant, availableDate, member, partySize, "request"); | ||
| return new Reservation(restaurant, availableDate, member.getId(), partySize, "request"); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ plugins { | |
|
|
||
| dependencies { | ||
| implementation project(':domain') | ||
| implementation project(':domain-member') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line adds a dependency on the new If the dependency is not needed, it should be removed to reduce the project's complexity and build time. |
||
| implementation project(':infra-redis') | ||
| implementation project(':infra-kafka') | ||
|
|
||
|
|
@@ -12,6 +13,7 @@ dependencies { | |
| implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
|
|
||
| testImplementation(testFixtures(project(':domain'))) | ||
| testImplementation(testFixtures(project(':domain-member'))) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line adds test fixtures for the If the test fixtures are not required, removing them will simplify the build configuration and reduce potential conflicts. |
||
| testImplementation 'io.rest-assured:rest-assured' | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,15 @@ | ||
| package com.wellmeet.favorite; | ||
|
|
||
| import com.wellmeet.domain.member.FavoriteRestaurantDomainService; | ||
| import com.wellmeet.domain.member.MemberDomainService; | ||
| import com.wellmeet.domain.member.entity.FavoriteRestaurant; | ||
| import com.wellmeet.domain.member.entity.Member; | ||
| import com.wellmeet.domain.restaurant.RestaurantDomainService; | ||
| import com.wellmeet.domain.restaurant.entity.Restaurant; | ||
| import com.wellmeet.domain.restaurant.review.ReviewDomainService; | ||
| import com.wellmeet.favorite.dto.FavoriteRestaurantResponse; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.function.Function; | ||
| import java.util.stream.Collectors; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Service; | ||
| import org.springframework.transaction.annotation.Transactional; | ||
|
|
@@ -19,14 +20,27 @@ public class FavoriteService { | |
|
|
||
| private final FavoriteRestaurantDomainService favoriteRestaurantDomainService; | ||
| private final ReviewDomainService reviewDomainService; | ||
| private final MemberDomainService memberDomainService; | ||
| private final RestaurantDomainService restaurantDomainService; | ||
|
|
||
| @Transactional(readOnly = true) | ||
| public List<FavoriteRestaurantResponse> getFavoriteRestaurants(String memberId) { | ||
| return favoriteRestaurantDomainService.findAllByMemberId(memberId) | ||
| .stream() | ||
| .map(favoriteRestaurant -> getFavoriteRestaurantResponse(favoriteRestaurant.getRestaurant())) | ||
| List<FavoriteRestaurant> favoriteRestaurants = favoriteRestaurantDomainService.findAllByMemberId(memberId); | ||
| if (favoriteRestaurants.isEmpty()) { | ||
| return List.of(); | ||
| } | ||
|
|
||
| List<String> restaurantIds = favoriteRestaurants.stream() | ||
| .map(FavoriteRestaurant::getRestaurantId) | ||
| .toList(); | ||
|
|
||
| Map<String, Restaurant> restaurantsById = restaurantDomainService.findAllByIds(restaurantIds).stream() | ||
| .collect(Collectors.toMap(Restaurant::getId, Function.identity())); | ||
|
|
||
| return favoriteRestaurants.stream() | ||
| .map(favoriteRestaurant -> { | ||
| Restaurant restaurant = restaurantsById.get(favoriteRestaurant.getRestaurantId()); | ||
| return getFavoriteRestaurantResponse(restaurant); | ||
|
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Restaurant restaurant = restaurantsById.get(favoriteRestaurant.getRestaurantId());
if (restaurant == null) {
throw new IllegalStateException("ID에 해당하는 식당을 찾을 수 없습니다: " + favoriteRestaurant.getRestaurantId());
}
return getFavoriteRestaurantResponse(restaurant); |
||
| }) | ||
| .toList(); | ||
| } | ||
|
|
||
|
|
@@ -37,9 +51,8 @@ private FavoriteRestaurantResponse getFavoriteRestaurantResponse(Restaurant rest | |
|
|
||
| @Transactional | ||
| public FavoriteRestaurantResponse addFavoriteRestaurant(String memberId, String restaurantId) { | ||
| Member member = memberDomainService.getById(memberId); | ||
| Restaurant restaurant = restaurantDomainService.getById(restaurantId); | ||
| FavoriteRestaurant favoriteRestaurant = new FavoriteRestaurant(member, restaurant); | ||
| FavoriteRestaurant favoriteRestaurant = new FavoriteRestaurant(memberId, restaurantId); | ||
| favoriteRestaurantDomainService.save(favoriteRestaurant); | ||
| return getFavoriteRestaurantResponse(restaurant); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,10 @@ public CreateReservationResponse reserve(String memberId, CreateReservationReque | |
| reservationRedisService.isReserving(memberId, request.getRestaurantId(), request.getAvailableDateId()); | ||
| Member member = memberDomainService.getById(memberId); | ||
| restaurantDomainService.decreaseAvailableDateCapacity(availableDate, request.getPartySize()); | ||
| Reservation reservation = request.toDomain(availableDate.getRestaurant(), availableDate, member); | ||
| Reservation reservation = request.toDomain(availableDate.getRestaurant(), availableDate, memberId); | ||
|
|
||
| Reservation savedReservation = reservationDomainService.save(reservation); | ||
| ReservationCreatedEvent event = new ReservationCreatedEvent(savedReservation); | ||
| ReservationCreatedEvent event = new ReservationCreatedEvent(savedReservation, member.getName()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Also, verify that the |
||
| eventPublishService.publishReservationCreatedEvent(event); | ||
|
|
||
| return new CreateReservationResponse(savedReservation); | ||
|
|
@@ -84,7 +84,8 @@ public CreateReservationResponse updateReservation( | |
| request.getSpecialRequest() | ||
| ); | ||
|
|
||
| ReservationUpdatedEvent event = new ReservationUpdatedEvent(reservation); | ||
| Member member = memberDomainService.getById(memberId); | ||
| ReservationUpdatedEvent event = new ReservationUpdatedEvent(reservation, member.getName()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Also, verify that the |
||
| eventPublishService.publishReservationUpdatedEvent(event); | ||
| return new CreateReservationResponse(reservation); | ||
| } | ||
|
|
@@ -96,7 +97,8 @@ public void cancel(Long reservationId, String memberId) { | |
| restaurantDomainService.increaseAvailableDateCapacity(availableDate, reservation.getPartySize()); | ||
| reservation.cancel(); | ||
|
|
||
| ReservationCanceledEvent event = new ReservationCanceledEvent(reservation); | ||
| Member member = memberDomainService.getById(memberId); | ||
| ReservationCanceledEvent event = new ReservationCanceledEvent(reservation, member.getName()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Also, verify that the |
||
| eventPublishService.publishReservationCanceledEvent(event); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line adds a dependency on the new
:domain-membermodule. Ensure that this dependency is necessary and doesn't introduce any circular dependencies or conflicts with existing dependencies. Also, verify that the correct version of the module is being used if versioning is in place.If the dependency is not needed, it should be removed to reduce the project's complexity and build time.