-
Notifications
You must be signed in to change notification settings - Fork 0
✨ Feat: Shop API 구현 완료 #41
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
Conversation
- endpoint: /shop/items?category=???&slice=1 - 기능: 특정 카테고리를 주면 해당 카테고리에 맞는 S3 이미지 링크 & 이미지 데이터들의 리스트를 Slice에 맞게 반환
phjlia2430
left a comment
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.
수고하셨습니다!
| insertCount++; | ||
| } | ||
| } | ||
| log.info("✅ 동기화 완료. [아이템 신규 추가: {}건, 아이템 수정: {}건", insertCount, updateCount); |
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.
아이템 신규 추가 부분에 [ ] 괄호 닫는 부분이 빠진거같습니다!
| * - Key: Item::getFullUrl로 만든 Full Url | ||
| * - Value: Item 객체 | ||
| */ | ||
| Map<String, Item> existItemMap = itemRepository.findAll().stream().collect(Collectors.toMap( |
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.
Collectors.toMap() 사용 시 key 중복이 발생하면 혹시나 부팅에서 오류가 발생할 가능성도 있어보입니다. 충돌 발생 시 어떤 데이터를 유지할지 지정해주거나 아니면 DB 에서 fullUrl에 unique 제약을 추가하는 방식도 함께 고려해볼 수 있을 것 같아요
#️⃣연관된 이슈
📝작업 내용
[추가]
특정 카테고리의 아이템들을 조회하는 API
특정 아이템 구매 API
(1) 해당 아이템이 실제로 존재하는 item인지?
(2) 해당 사용자가 이미 구매한 Item인지?
의 사항들을 검증함
특정 아이템 장착/해체 API
서버 시작 시, DB에 있는 Item Table의 내용을 확인하고, 설정된 값대로 Item 인스턴스들 자동으로 생성해서 Update 시켜주는 기능
[수정]
-1. User 회원가입(구글, Guest)시, 사용자 능력치(Ability) & Shop 아이템(기본 아이템) 부여해주도록 수정
💬리뷰 요구사항
shop.loader.ItemInitializer
shopService.equipItem