diff --git a/build.gradle b/build.gradle index 47964dc6..19f40b08 100644 --- a/build.gradle +++ b/build.gradle @@ -33,6 +33,7 @@ dependencies { implementation 'io.jsonwebtoken:jjwt-api:0.12.3' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'com.mysql:mysql-connector-j' diff --git a/src/main/java/team7/inplace/video/application/VideoService.java b/src/main/java/team7/inplace/video/application/VideoService.java index 2c39d074..24a566ce 100644 --- a/src/main/java/team7/inplace/video/application/VideoService.java +++ b/src/main/java/team7/inplace/video/application/VideoService.java @@ -1,22 +1,28 @@ package team7.inplace.video.application; -import java.util.ArrayList; -import java.util.List; import lombok.RequiredArgsConstructor; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import team7.inplace.influencer.domain.Influencer; import team7.inplace.influencer.persistence.InfluencerRepository; -import team7.inplace.place.application.dto.PlaceForVideo; import team7.inplace.place.domain.Place; +import team7.inplace.place.application.dto.PlaceForVideo; +import team7.inplace.place.persistence.PlaceRepository; import team7.inplace.video.application.dto.VideoInfo; import team7.inplace.video.domain.Video; import team7.inplace.video.persistence.VideoRepository; +import team7.inplace.video.presentation.dto.VideoSearchParams; + +import java.util.ArrayList; +import java.util.List; @Service @RequiredArgsConstructor public class VideoService { private final VideoRepository videoRepository; private final InfluencerRepository influencerRepository; + private final PlaceRepository placeRepository; public List findByInfluencer(List influencers) { // 인플루언서 정보 처리 @@ -31,6 +37,31 @@ public List findByInfluencer(List influencers) { return videoToInfo(savedVideos); } + public List findAllDesc() { + // id를 기준으로 내림차순 정렬하여 비디오 정보 불러오기 + List