-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: 버스 교통편 조회 API #1099
base: develop
Are you sure you want to change the base?
feat: 버스 교통편 조회 API #1099
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.
PR 상세히 작성해주셔서 리뷰하기 편했습니다!
고생많이하셨어요~
src/main/java/in/koreatech/koin/domain/bus/model/express/ExpressBusSchedule.java
Outdated
Show resolved
Hide resolved
src/main/java/in/koreatech/koin/domain/bus/model/mongo/CityBusTimetable.java
Show resolved
Hide resolved
src/main/java/in/koreatech/koin/domain/bus/service/route/ShuttleBusRouteStrategy.java
Outdated
Show resolved
Hide resolved
src/main/java/in/koreatech/koin/domain/bus/service/route/BusRouteStrategy.java
Outdated
Show resolved
Hide resolved
if (!foundDepart && node.getNodeName().contains(departNode.getQueryName())) { | ||
foundDepart = true; | ||
} | ||
|
||
else if (foundDepart && node.getNodeName().contains(arriveNode.getQueryName())) { | ||
return true; | ||
} |
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.
C
출발지를 찾는 로직과 도착지를 찾는 로직을 else로 엮지 않고 분리하면 조금 더 잘 읽힐 것 같습니다!
if (!foundDepart && node.getNodeName().contains(departNode.getQueryName())) {
foundDepart = true;
}
if (foundDepart && node.getNodeName().contains(arriveNode.getQueryName())) {
return true;
}
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.
else-if 블록이 실행되는 경우를 살펴보려면, 상위 if문의 조건과, else-if문의 조건을 모두 만족해야하기 때문에 조건을 두번 확인해야하는 수요가 생깁니다.
if 문을 한번만 사용한다면 분기를 한번만 확인하기 때문에 가독성이 높아진다고 생각합니다. 어떻게 생각하시나요?
🔥 연관 이슈
🚀 작업 내용
설계
DataSource
셔틀버스 스케줄 조회 상세 구현 로직
RequestBody
"2024-11-05"
)."00:00"
).ALL, CITY, EXPRESS, SHUTTLE
)KOREATECH, TERMINAL, STATION
).KOREATECH, TERMINAL, STATION
).ResponseBody
💬 리뷰 중점사항