Skip to content

feat(shortform): 숏폼 조회 API에 isLiked 필드 추가 [KAN-284]#40

Closed
lian2945 wants to merge 12 commits into
mainfrom
feat/284
Closed

feat(shortform): 숏폼 조회 API에 isLiked 필드 추가 [KAN-284]#40
lian2945 wants to merge 12 commits into
mainfrom
feat/284

Conversation

@lian2945

Copy link
Copy Markdown
Collaborator

관련 이슈

KAN-284 - 숏폼 조회 API에 현재 사용자 좋아요 여부(isLiked) 필드 추가

변경 사항 요약

  • GetShortFormQuery, GetAllShortFormsQuery, GetShortFormsByCreatorQueryuserId 필드 추가
  • ShortFormResult, ShortFormResponseisLiked 필드 추가
  • GetShortFormService: ShortFormLikeRepositoryPort.existsByShortFormIdAndUserId()로 좋아요 여부 계산
  • GetAllShortFormsService, GetShortFormsByCreatorService: 목록 조회 시 각 숏폼마다 isLiked 계산
  • ShortFormQueryController: @AuthenticationPrincipal UserId userId를 단건/목록 조회 모두에 전달

테스트 체크리스트

  • 좋아요를 누른 숏폼 단건 조회 시 isLiked: true 반환 확인
  • 좋아요를 누르지 않은 숏폼 단건 조회 시 isLiked: false 반환 확인
  • 숏폼 목록 조회(GET /shortform) 시 각 숏폼의 isLiked 정확히 반환 확인
  • 크리에이터별 숏폼 목록 조회(GET /shortform?creatorId=) 시 isLiked 정확히 반환 확인

lian2945 and others added 12 commits June 9, 2026 17:45
…ype 전파 [KAN-215]

- ProductType enum 신규 (RELEASE, GENERAL_GOODS)
- OrderLine 도메인에 productType 필드 추가 (createBuilder, reconstructBuilder)
- OrderLineEntity에 product_type 컬럼 추가 (@Enumerated STRING)
- OrderMapper toLineEntity/toLineDomain에 productType 매핑 추가
- OrderPrepareEvent.OrderItemPayload에 product_type 필드 추가
- CreateOrderCommand.OrderLineCommand에 productType 추가
- OrderLineRequest에 productType 추가 (validation 포함)
- CreateOrderService: command에서 productType 전달
- CreateReleaseOrderService: ProductType.RELEASE 하드코딩

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- OrderLine 도메인, OrderLineEntity에 thumbnailUrl 필드 추가
- 주문 생성 요청(CreateOrderRequest, CreateReleaseOrderRequest, OrderLineRequest)에 thumbnailUrl 수신
- CreateOrderCommand, CreateReleaseOrderCommand에 thumbnailUrl 전달
- CreateOrderService, CreateReleaseOrderService에서 OrderLine 생성 시 thumbnailUrl 세팅
- OrderMapper toLineEntity/toLineDomain에 thumbnailUrl 매핑
- OrderResultMapper, OrderLineResult, OrderLineResponse에 thumbnailUrl 포함

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ReadNotificationCommand: notificationId → notificationIds(List<Long>)로 변경
- ReadNotificationUseCase: read() → readAll()로 변경
- ReadNotificationService: updateAllByIdsAndUserId 단일 쿼리로 일괄 처리
- NotificationJpaRepository: @Modifying bulk UPDATE 쿼리 추가
- NotificationJpaAdapter: updateAllByIdsAndUserId 구현
- NotificationCommandController: PATCH /{id}/read → PATCH /read (body: notificationIds)
- ReadNotificationsRequest: 신규 request DTO 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… [KAN-255]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- OrchestratorCommandEventType: STOCK_RESERVE_RELEASE / STOCK_RESERVE_GENERAL_GOOD 추가, 구버전 STOCK_RESERVE 제거
- OrderPrepareEvent.ItemPayload에 product_type 필드 추가
- HandleOrderPrepareService: productType=GENERAL_GOODS이면 stock-reserve.general-good, 그 외 stock-reserve-release 커맨드 발행
- StockEventKafkaListener: stock-reserve-general-goods-succeeded/failed 토픽 리스너 추가
- StockReserveCommand 미사용 클래스 삭제

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- OrchestratorCommandKafkaListener: 토픽 stock-reserve → stock-reserve-release, RetryableTopic에 DltStrategy.FAIL_ON_ERROR + exclude BusinessException 추가
- ReleaseEntity: @Version 낙관적 락 제거 (UPDATE WHERE DB 원자성으로 대체)
- ReleaseJpaRepository: increaseSoldQuantity(@Modifying UPDATE WHERE), findCreatorIdById 추가
- ReleaseRepositoryPort: increaseSoldQuantity, findCreatorIdById 인터페이스 추가
- ReleaseJpaAdapter: 두 메서드 구현
- HandleStockReserveService: release.increaseSoldQuantity() + update() → increaseSoldQuantity() UPDATE WHERE로 교체, 0 rows 반환 시 failed 이벤트 발행

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…[KAN-217]

- @Version 낙관적 락 제거 (UPDATE WHERE DB 원자성으로 대체)
- categories @ElementCollection@Enumerated(EnumType.STRING) 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- RedisPubSubAdapter 제거, RedisStreamAdapter 신규 구현
- XADD로 메시지 영속화, XREAD 폴링으로 구독
- 스트림 키: sse:stream:notification:{userId}, sse:stream:logout:{userId}
- ReactiveRedisMessageListenerContainer 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…드 추가 [KAN-284]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GetShortFormService: ShortFormLikeRepositoryPort로 isLiked 체크
- GetAllShortFormsService: 목록 조회 시 각 숏폼 isLiked 체크
- GetShortFormsByCreatorService: 크리에이터별 조회 시 isLiked 체크

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 전달 [KAN-284]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lian2945

Copy link
Copy Markdown
Collaborator Author

독립 레포(MagicBoxLian0408/shortform)에서 재작업 예정

@lian2945 lian2945 closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant