Merged
Conversation
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Summary
✨ Description
상품 크롤링 및 저장 과정에서 중복 검사 방식을 개선하고,
Kream처럼 고유 productId가 없는 경우에도 중복 저장을 방지하도록 로직을 수정했습니다.✅ 기존 문제
productId가 있는 경우existsByProductId()를 사용하여 중복 저장을 방지했으나,Kream 상품은 productId가 존재하지 않아 중복 검사가 불가능한 문제가 있었습니다.
🛠 해결 방법
상품 저장 로직 개선
productId가 존재하는 경우 기존 로직 유지productId가 없는 경우,title + mallName을 기준으로 중복 검사를 수행title과mallName을 가진 상품이 존재하면 새로운 정보로 덮어쓰기 (업데이트)ProductRepository에 새로운 중복 검사 메서드 추가
findByTitleAndMallName()메서드 추가하여title + mallName기반으로 중복 여부 확인Kream 상품 저장 방식 변경
productId가 없는 경우에도title + mallName을 기준으로 저장🗒️ Review Point