-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor #116 일정 생성 로직 수정 #116
The head ref may contain hidden characters: "refactor/#93/\uC77C\uC815-\uC0DD\uC131-\uB85C\uC9C1-\uC218\uC815"
Conversation
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.
고생하셨습니다 ! -228... 대공사였네요
PR에 적힌 내용대로 Event dto, Meting Dto가 삭제되면서
Schedule Dto로 통합되는 과정에서 빠진 내용들은 없는지, 삭제된 메서드 중에 불필요하게 중복된 메서드가 정리되었는지, 필요한 메서드가 누락된 것은 없는지 위주로 확인했습니다
추후에 출석 자동화 작업시에 해당 변경된 내용 참고해서 반영해서 작업하도록 하겠습니다
return CommonResponse.createSuccess(EVENT_UPDATE_SUCCESS.getMessage()); | ||
} | ||
|
||
@DeleteMapping("/{eventId}") | ||
@Operation(summary="일정 삭제") | ||
@Operation(summary = "일정 삭제") | ||
public CommonResponse<Void> delete(@PathVariable Long eventId) { | ||
eventUseCase.delete(eventId); |
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.
일정과 정기모임을 생성이랑 수정해주는건 단일 API고
삭제는 type을 받지않고, 개별 API로 처리해주신건 의도된 설계인거죠 ??
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.
네네 맞습니당
if (dto.type() == Type.EVENT) { | ||
eventUseCase.update(eventId, dto, userId); | ||
} else { | ||
meetingUseCase.update(dto, userId, eventId); | ||
} |
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.
type을 체크해줘서 일정이랑 정기모임별로 생성 및 수정이 가능하도록 개선한 내용이네용 👍🏻
public Map<Integer, List<Response>> findByYearly(LocalDateTime start, LocalDateTime end) { | ||
List<Response> events = eventGetService.find(start, end); | ||
List<Response> meetings = meetingGetService.find(start, end); | ||
public Map<Integer, List<Response>> findByYearly(Integer year, Integer semester) { |
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.
해당 부분에서 일정 조회할때 연도랑 학기 단위로 조회 가능하도록 변경된거 또한 확인했습니다 !
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.
수고하셨습니다~!
@Parameter(hidden = true) @CurrentUser Long userId) { | ||
eventUseCase.save(dto, userId); | ||
if (dto.type() == Type.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.
dto에서 타입을 받아 경우에 따라 저장하는거 확인했습니다!
@NotBlank String content, | ||
@NotBlank String location, | ||
@NotBlank String requiredItem, | ||
@NotNull Type type, |
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.
update에 type이 필요 없지 않을까요?
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.
수정도 한 API에서 진행을 해서 기존 type을 그대로 받아서 확인을 통해 event인지 meeting인지 구분 해줘야한다고 판단했습니다!
PR 내용
PR 세부사항
관련 스크린샷
주의사항
체크 리스트