Repository navigation
[FEAT/#33] 가게 상세 조회 API 연동 - #37
Conversation
chldmswll
left a comment
There was a problem hiding this comment.
너무 잘해서 리뷰 달게 없군....... 진짜 항상 빠르게 PR 올려줘서 너무 감사합니다... 언니는 정말 짱이야,,ㅎㅎ 언니 코드 보면서 많이 배웠어요!!
| id = menu.menuId.toInt(), | ||
| storeId = storeId.toInt(), |
There was a problem hiding this comment.
P2 : API 명세에서는 menuId와 storeId를 Long으로 받아오는데, UiModel에서는 타입이 Int라서 여기서 toInt()로 바꿔주고 있는 것 같아요! toInt()로 줄이면 값이 커졌을 때 잘릴 수도 있어서, 혹시 Int로 둔 이유가 따로 없다면 UiModel 타입도 명세에 맞춰 Long으로 맞춰주는 건 어떨까요?
There was a problem hiding this comment.
반영했습니다!! UiModel 타입도 명세에 맞춰서 Long으로 바꿨어요
| businessHours = businessHours, | ||
| phone = phone, | ||
| imageUrls = imageUrls, | ||
| representativeMenus = representativeMenus.map { it.toModel() }, |
There was a problem hiding this comment.
P2 : 응답에 displayOrder가 있는데 정렬 없이 그대로 매핑하고 있어요! 서버가 항상 순서대로 내려주긴 하지만, 확실히 하기 위해서 sortedBy { it.displayOrder } 한 번 걸어주면 안전할 것 같은데 어떻게 생각하시나요?
There was a problem hiding this comment.
좋은 의견 감사해여 sortedBy { it.displayOrder } 추가해서 순서 보장되도록 했습니당
| storeId = storeId.toInt(), | ||
| imgUrl = menu.imageUrl, | ||
| name = menu.name, | ||
| price = "%,d".format(menu.price), |
There was a problem hiding this comment.
P3 : 이건 정말 사소한 거긴 한데, String.format은 기기 Locale을 따라가서, 언어 설정에 따라 구분자가 , 대신 .이나 공백으로 나올 수도 있어요! %,d".format(Locale.KOREA, menu.price)처럼 Locale을 고정해보는 건 어떨까요?
There was a problem hiding this comment.
오 이렇게도 할 수 있군요 ㅎㅎ Locale.KOREA로 고정했습니당
| content = amenity.content, | ||
| ) | ||
| }, | ||
| ) No newline at end of file |
There was a problem hiding this comment.
P2 : 그리고 여기 지금 캡처같은 아이콘이 보이시나여? 이부분 서현언니가 아티클 적어줬는데 보고 반영해주면 좋을 것 같아용!
아티클 링크!!
| override suspend fun getStoreDetail(storeId: Long): Result<StoreDetailModel> = | ||
| suspendRunCatching { | ||
| storeService.getStoreDetail(storeId).getDataOrThrow().toModel() |
There was a problem hiding this comment.
service->repository->usecase->viewmodel흐름 맞춰져있어서 읽기 편했어요!!! 저도 이렇게 따라했습니당 ㅎㅎ...
|
승혁님 코드에 댓글 달 수 없음 이슈로... |






Related issue 🛠
Work Description ✏️
Screenshot 📸
KakaoTalk_20261118_195416610.mp4
To Reviewers 📢