From 19769a7d2de74fc05114ca20d5a8c2d6af677812 Mon Sep 17 00:00:00 2001 From: KWON-MINWOO Date: Mon, 29 Jun 2026 20:48:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B1=84=EB=84=90=20PPL=20=EC=9D=B4?= =?UTF-8?q?=EB=A0=A5=20API=EC=9D=98=20channelId=EB=A5=BC=20YouTube=20?= =?UTF-8?q?=EC=B1=84=EB=84=90=20ID=EC=97=90=EC=84=9C=20=EB=82=B4=EB=B6=80?= =?UTF-8?q?=20ID=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ChannelBrandHistoryApi.java | 10 +++++----- .../controller/ChannelBrandHistoryController.java | 4 ++-- .../service/ChannelBrandHistoryService.java | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java b/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java index df250c2..808d9d4 100644 --- a/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java +++ b/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java @@ -30,8 +30,8 @@ public interface ChannelBrandHistoryApi { ) @ApiErrorDefines({ErrorDefine.INVALID_ARGUMENT}) BaseResponse> search( - @Parameter(description = "YouTube 채널 ID", example = "UCxxxxxxxxxxxxxxxxxxxxxx") - @PathVariable String channelId, + @Parameter(description = "채널 ID", example = "1701") + @PathVariable Long channelId, @ParameterObject ChannelBrandHistorySearchCondition condition ); @@ -40,7 +40,7 @@ BaseResponse> search( description = """ 특정 채널의 PPL 영상(최대 50개)을 집계하여 분석 결과를 반환합니다. - - `channelId`는 Path Variable로 전달합니다. (YouTube 채널 ID) + - `channelId`는 Path Variable로 전달합니다. (로그인 응답의 channelId) **brands** (브랜드별 협업 수) - 전체 영상의 태그를 집계하여 빈도순 정렬 @@ -58,8 +58,8 @@ BaseResponse> search( ) @ApiErrorDefines({ErrorDefine.INVALID_ARGUMENT}) BaseResponse analysis( - @Parameter(description = "YouTube 채널 ID", example = "UCxxxxxxxxxxxxxxxxxxxxxx") - @PathVariable String channelId, + @Parameter(description = "채널 ID", example = "1701") + @PathVariable Long channelId, @ParameterObject ChannelBrandHistorySearchCondition condition ); } diff --git a/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java b/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java index 318a2a8..d66a7f3 100644 --- a/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java +++ b/src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java @@ -23,7 +23,7 @@ public class ChannelBrandHistoryController implements ChannelBrandHistoryApi { @Override @GetMapping("/{channelId}") public BaseResponse> search( - @PathVariable String channelId, + @PathVariable Long channelId, @ModelAttribute ChannelBrandHistorySearchCondition condition ) { return new BaseResponse<>(channelBrandHistoryService.search(channelId, condition)); @@ -32,7 +32,7 @@ public BaseResponse> searc @Override @GetMapping("/{channelId}/analysis") public BaseResponse analysis( - @PathVariable String channelId, + @PathVariable Long channelId, @ModelAttribute ChannelBrandHistorySearchCondition condition ) { return new BaseResponse<>(channelBrandHistoryService.analysis(channelId, condition)); diff --git a/src/main/java/com/example/inflace/domain/brandcollaboration/service/ChannelBrandHistoryService.java b/src/main/java/com/example/inflace/domain/brandcollaboration/service/ChannelBrandHistoryService.java index 8a198f5..2e4971c 100644 --- a/src/main/java/com/example/inflace/domain/brandcollaboration/service/ChannelBrandHistoryService.java +++ b/src/main/java/com/example/inflace/domain/brandcollaboration/service/ChannelBrandHistoryService.java @@ -63,8 +63,8 @@ public class ChannelBrandHistoryService { private final VideoQueryRepository videoQueryRepository; private final VideoRepository videoRepository; - public CursorSliceResponse search(String channelId, ChannelBrandHistorySearchCondition condition) { - Optional channelOpt = channelRepository.findByYoutubeChannelId(channelId); + public CursorSliceResponse search(Long channelId, ChannelBrandHistorySearchCondition condition) { + Optional channelOpt = channelRepository.findById(channelId); if (channelOpt.isEmpty()) { return emptyResponse(condition); } @@ -146,8 +146,8 @@ private ChannelVideoSort toChannelVideoSort(String sortCriteria) { }; } - public ChannelBrandHistoryAnalysisResponse analysis(String channelId, ChannelBrandHistorySearchCondition condition) { - Optional channelOpt = channelRepository.findByYoutubeChannelId(channelId); + public ChannelBrandHistoryAnalysisResponse analysis(Long channelId, ChannelBrandHistorySearchCondition condition) { + Optional channelOpt = channelRepository.findById(channelId); if (channelOpt.isEmpty()) { return emptyAnalysis(); }