Skip to content

Commit 52f4747

Browse files
authored
Hotfix : 정원 모집 완료시 closed가 아닌 completed로 수정 (#132)
* Hotfix : 정원 모집 완료시 closed가 아닌 completed로 수정
1 parent 55849ab commit 52f4747

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/main/java/ita/tinybite/domain/party/service/PartyService.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ public void approveParticipant(Long partyId, Long participantId, Long hostId) {
580580
partyId
581581
);
582582

583-
// 목표 인원 달성 확인
584-
checkAndCloseIfFull(party);
583+
// 정원이 찼으면 모집 완료 상태로 변경
584+
checkAndCompleteIfFull(party);
585585
}
586586

587587
/**
@@ -783,10 +783,14 @@ private void validateGroupChatRoomAccess(Party party, Long userId) {
783783
}
784784
}
785785

786-
// ??
787-
private void checkAndCloseIfFull(Party party) {
786+
/**
787+
* 정원이 찼으면 모집 완료 상태로 변경
788+
* - COMPLETED: 정원이 찼거나 모집이 완료된 상태 (파티 진행 중)
789+
* - CLOSED: 파티가 정상적으로 종료된 상태 (결산 완료 후)
790+
*/
791+
private void checkAndCompleteIfFull(Party party) {
788792
if (party.getCurrentParticipants() >= party.getMaxParticipants()) {
789-
party.close();
793+
party.changePartyStatus(PartyStatus.COMPLETED);
790794
}
791795
}
792796

0 commit comments

Comments
 (0)