Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public PermissionResponseDto updatePermission(PermissionRequestDto permissionReq
PermissionResult result = permissionRequestDto.getAccept() ? PermissionResult.ACCEPT : PermissionResult.REJECT;
log.debug("ParticipationService #updatePermission(): result = {}", result);
participation.updateResult(result);
schedule.updateNumberOfPeopleWaiting(result); //
schedule.updateNumberOfPeopleWaiting(result);

return PermissionResponseDto.of(participation);
}
Expand All @@ -106,7 +106,7 @@ public Set<WaitingListInfoResponseDto> getWaitingList(Long scheduleId) {
}


// 닉네임 매핑할 때 persistence 문제 생길텐데? -> 왜 안생기지?

public Set<ParticipantInfoResponseDto> getParticipantList(Long scheduleId) {
Set<ParticipantInfoResponseDto> participantInfoResponseDtoSet = new HashSet<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
@Service
public class SchedulesService {

/**
* todo
* 스케쥴 관련 비즈니스 로직을 처리하는 곳에서 member 도메인의 repository 와 협력관계를 갖는 게 적절한가? 필요한 메서드는 id로 멤버를 찾아주는 기능뿐인데
*/
private final MemberRepository memberRepository;
private final SchedulesRepository schedulesRepository;

Expand Down Expand Up @@ -66,9 +62,7 @@ public SliceCustom<AllScheduleResponseDto> getAllSchedule(int page, int size) {
return new SliceCustom<>(dtoList, dtoSlice.hasNext(), dtoSlice.getNumber());
}

/** todo
* 스케쥴과 페이지를 만드는 메소드는 관계가 없다. srp 를 지키고 있지 않은 메소드
*/

private PageRequest makePageRequest(int page, int size) {
final Sort sort = Sort.by(Sort.Direction.DESC, "createdDate");
return PageRequest.of(page, size, sort);
Expand Down