Skip to content

상품 추가 API 구현 #109

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

Merged
merged 7 commits into from
Nov 23, 2023
Merged

상품 추가 API 구현 #109

merged 7 commits into from
Nov 23, 2023

Conversation

sickbirdd
Copy link
Collaborator

@sickbirdd sickbirdd commented Nov 23, 2023

Resolves #43

진행 내용

상품 추가 API 로직

  1. 상품 코드를 통해 상품테이블에 등록된 상품인지 DB에서 검색
  2. 최초로 등록되는 상품이면 상품 테이블에 상품 추가
  3. 이미 등록된 상품이면 상품 추가 X
  4. 상품 추적 테이블에 사용자 ID, 상품 ID, 목표 가격을 저장

변경 사항

  • ProductDetailsDto는 OpenAPI에서 상품 정보를 받아오기 위해 필요한 DTO인데, Product Table에 저장하기 위한 용도의 DTO도 필요하다고 생각해서 ProductDto를 별도로 만들어줬음.
  • 따라서 기존에 있던 ProductDtoProductAddDto로 변경
  • 11번가 Open API 호출 코드 함수로 분리
  • 11번가 Open API에서 불러오는 가격 정보를 Price(원가)에서 LowestPrice(할인가)로 변경
  • 기존에 사용하던 Repository<TrackingProduct>를 별도의 클래스 TrackingProductRepository로 분리

@sickbirdd sickbirdd added feature 새로운 기능 backend 백엔드 관련 labels Nov 23, 2023
@sickbirdd sickbirdd added this to the 3주차 milestone Nov 23, 2023
@sickbirdd sickbirdd requested a review from Muungi November 23, 2023 02:12
@sickbirdd sickbirdd self-assigned this Nov 23, 2023
Copy link
Collaborator

@Muungi Muungi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 잘 작성하셔서 코드적으로 리뷰 할 내용이 없네요ㅎㅎ

@sickbirdd sickbirdd requested a review from Muungi November 23, 2023 03:07
@Muungi Muungi merged commit 61ec71b into dev/be Nov 23, 2023
@sickbirdd sickbirdd deleted the feat/be/add-product branch December 14, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend 백엔드 관련 feature 새로운 기능
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[상품 추가 화면] 데이터베이스에 유저의 상품 및 목표가격을 갱신한다.
2 participants