-
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
리뷰 2주차 #40
base: review
Are you sure you want to change the base?
리뷰 2주차 #40
Conversation
- BookDetailPage 컴포넌트에서 params 비동기 처리 구현 - BookDetailPageProps 인터페이스 업데이트: params를 Promise 타입으로 변경 - fetch 호출 시 await로 해결된 id 값 사용 - Route used `params.id`. `params` should be awaited before using its properties" 에러 해결
- 회원: 임시로 쿠키의 member_id를 사용하여 서버에 장바구니 추가 요청 - user_session, member_id 쿠키 존재 시 로그인 상태로 간주 - POST /cart/{book-id}/{member-id} 엔드포인트 호출 - 비회원: 로컬스토리지를 사용하여 장바구니 데이터 관리 - 키: guest_cart - 데이터: bookId, quantity 정보 저장 - 동일 상품 추가 시 수량 증가 처리 추가 구현 사항: - 장바구니 담기 버튼 컴포넌트 분리 - 수량 선택 및 총 상품금액 표시 기능
- @Profile("dev")로 dev 모드일 때만 실행됨 - ./frontend/types/schema.d.ts 경로에 생성됨
- 출간일순, 판매량순, 평점순, 리뷰순 정렬 - 평점순은 총점인 db로는 구현하지 못해서 averageRating 추가 - 정렬 시 판매량인 경우 판매량이 같거나 없는경우 출간일 순으로 보조 정렬, 다른 것도 같음
…1-Book,Cart # Conflicts: # backend/src/main/resources/application.yml
Refactor: BaseInitDate makeSampleBooks() 일부 수정
- 전체 주문 조회 API 추가 - 기존 서비스, 컨트롤러, DTO를 관리자 전용으로 분리 - order 엔티티와 orderDetail 엔티티 간 1:N 관계 적용 - 코드 컨벤션 적용 및 구조 개선 - 페이징 및 정렬 기능 추가
…-team8 into feature-order-search
question 컨트롤러와 answer 컨트롤러 api를 구현했습니다.
… into Feature1-Book,Cart # Conflicts: # frontend/app/components/book/BookInfo.tsx
Refactor: 전체 주문 조회 기능 개선 및 구조 리팩토링
카카오 로그인 및 JWT 기반 인증 구현
# Conflicts: # backend/src/main/resources/application.yml # frontend/app/components/NavBar.tsx # frontend/package.json
…donghui-2025-02-11 qna 프론트 질문 페이지 완성
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 설계 관점에서 어려움을 겪은 듯한 느낌이 드는데요. 리뷰 코멘트에서 남겼듯이 다른 기업의 openapi 스펙을 꼼꼼히 읽어보면 많은 도움이 될 것 같아요.
- 초반 프로젝트라 기술적인 챌린지에 대해선 넣지 않았는데요. 다음 프로젝트부터는 이 부분도 고려해보시면 좋을 것 같아요. (멘토링 시간에 앞으로의 공부 방향성 및 기술적 고찰에 대해 이야기 해볼게요.)
그동안 프로젝트 하느라 고생 많으셨습니다!
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-webflux' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
implementation("io.jsonwebtoken:jjwt-api:0.11.5") |
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.
형식은 맞춰주세요.
} | ||
|
||
//문자열이 비어있는지 확인 | ||
private boolean isBlank(String str) { |
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.
저번에 라이브러리 설명드렸었죠?
그리고 그게 아니더라도, 다른곳에서 사용할 가능성이 있다면 이 메서드는 여기 있으면 안됩니다.
return questionRepository.findByTitleContainingOrContentContaining(keyword, keyword, pageable); | ||
} | ||
return hasAnswer | ||
? questionRepository.findByAnswersIsNotEmptyAndTitleContainingOrContentContaining(keyword, keyword, pageable) |
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.
메서드 이름의 가독성이 정말, 정말 안 좋네요...
아무리 Data JPA의 네이밍 컨벤션이라고 해도, 적당히 자를 필요가 있습니다.
public ResponseEntity<String> deleteBook(@PathVariable Long bookId) { | ||
adminBookService.deleteBook(bookId); | ||
|
||
return ResponseEntity.ok("도서가 성공적으로 삭제되었습니다."); |
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.
가능하면, 기업의 OpenAPI 명세를 읽어보면서, 이쪽에서 제공하는 리턴값을 꼭 확인해봤으면 좋겠어요.
- https://developers.kakaopay.com/docs/moneytransfer/sendmoney.code/api-qrlink-delete
- https://developers.worksmobile.com/kr/docs/group-delete
공통점이 있지 않나요?
.author(this.author != null ? this.author : "") // 필수: 저자 | ||
.publisher(this.publisher) // 선택: 출판사 | ||
.isbn(this.isbn) // 선택: ISBN | ||
.isbn13(this.isbn13 != null ? this.isbn13 : "9999999999999") // 필수: ISBN13 |
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.
꼭 기본 placeholder가 있어야 할까요?
|
||
private String toc; // 목차 | ||
@NotNull |
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.
전반적인 indent가 꼬인 것 같아요.
public boolean registerBook(String isbn13) { | ||
// 기존 DB에서 중복 확인 | ||
if (bookRepository.existsByIsbn13(isbn13)) { | ||
throw new IllegalArgumentException("ISBN " + isbn13 + "은(는) 이미 등록된 도서입니다."); |
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.
이거 문자열 합치는 법 다음에 알려드릴게요 ㅎㅎ
} | ||
|
||
public Book create(Book book) { |
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.
Transactional 이 없네요?
|
||
switch (searchType) { | ||
case AUTHOR: |
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.
JDK 17로 넘어가면서 switch 구문이 어떻게 변했는지 알아보시면 좋을 것 같습니다.
JsonNode itemNode = rootNode.path("item").get(0); // 첫 번째 도서 정보 추출 | ||
|
||
if (itemNode.isMissingNode()) { | ||
System.out.println("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.
무슨 일이 있어도 서버 개발에선 System.out.println 을 쓰지 말아주세요.
…-team8 into Feature1-Book,Cart
Feature order search
전반적인 에러 수정, 사이드바에 프로필 이미지 표시 추가
Fix: my/orders 사이드바 경로 변경 - 마이페이지 부분 코드 일부 수정,
멘토링