Skip to content

Commit

Permalink
fix: 수락 시, UNLIMITED 상태에서는 검사 안하도록 수정 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ympark99 committed Oct 13, 2023
1 parent 3e32598 commit 1371092
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ public List<ApplyDto> getList(Member applicant) {
@Transactional
public String applyProcess(Long sparkId, Long applicantId, AcceptStatus acceptStatus) {
MemberSparkMapping memberSparkMapping = loadApplyPort.getApply(applicantId, sparkId);
// 인원 추가 검사
if (memberSparkMapping.getApplySpark().getMemberCount() >= memberSparkMapping.getApplySpark()
.getCapacity()) {
// 인원 추가 검사(LIMIT 상태일때)
if (memberSparkMapping.getApplySpark().getCapacityType() == CapacityType.LIMIT
&& memberSparkMapping.getApplySpark().getMemberCount() >= memberSparkMapping.getApplySpark()
.getCapacity()) {
throw new BaseException(ErrorCode.OVER_MEMBERCOUNT);
}
if (acceptStatus == AcceptStatus.ACCEPT) {
Expand Down

0 comments on commit 1371092

Please sign in to comment.