-
Notifications
You must be signed in to change notification settings - Fork 4
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
[NAYB-81] feat: 사용자와 연관된 데이터를 제거 #106
Conversation
…4-NaBMart into feature/NAYB-81
…4-NaBMart into feature/NAYB-150
`Order`와의 연관관계만 끊어주도록 변경하였음
사용자 삭제 시 `Order`삭제 및 빈번한 조회의 사유로 `Delivery` 엔티티에 관련 필드들을 추가하여 반정규화하였음
|
||
public interface CartItemRepository extends JpaRepository<CartItem, Long> { | ||
|
||
List<CartItem> findAllByCartItemIdOrderByCreatedAt(Long cartItemId); | ||
|
||
List<CartItem> findAllByCartOrderByCreatedAt(Cart cart); | ||
|
||
@Modifying |
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.
이건 어떤 옵션인가요??
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.
@Query
를 사용할시 insert, update, delete 작업을 하기 위해 필요한 어노테이션입니다!
properties.setProperty("REDIS_HOST", "localhost"); | ||
properties.setProperty("REDIS_PORT", "6379"); | ||
properties.setProperty("spring.data.redis.host", "localhost"); | ||
properties.setProperty("spring.data.redis.port", "6379"); |
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.
properties.setProperty("spring.data.redis.port", "6379"); | |
properties.setProperty("REDIS_HOST", "localhost"); | |
properties.setProperty("REDIS_PORT", "6379"); | |
properties.setProperty("spring.data.redis.host", "localhost"); | |
properties.setProperty("spring.data.redis.port", "6379"); |
REDIS_HOST, spring.data.redis.host 둘 다 필요한가요??
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.
해당 환경변수를 설정해주지 않으니 테스트가 안 돌아가서 추가해주었습니다!
⛏ 작업 사항
Delivery
의 경우 라이더에게 중요한 데이터이기에 제거하지 않고 남겨두었습니다. 더하여 조회시 빈번한 조인이 일어나는Order
의 일부 필드들을 반정규화 하였습니다.리뷰
,찜 상품
,장바구니
,장바구니 상품
,결제내역
,주문
,유저쿠폰
,유저
가 삭제됩니다.상품
,카테고리
,이벤트
,쿠폰
,라이더
는 삭제되지 않습니다.배달
은상품
과의 연관관계를 끊고 주소 정보가 "삭제됨"이라는 텍스트로 대체됩니다.📝 작업 요약
Delivery
반정규화(address, price, deliveryFee, riderRequest 추가)💡 관련 이슈