-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from Central-MakeUs/fix/recommendVote
[fix]: 팝콘작 (추천) 랜덤으로 3개 반환하기, 무한 스크롤 구현
- Loading branch information
Showing
9 changed files
with
90 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...n/java/com/example/api/recommendedPopcorn/service/GetRecommendedRandomPopcornUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.example.api.recommendedPopcorn.service; | ||
|
||
import com.example.adaptor.UseCase; | ||
import com.example.domains.recommendedPopcorn.adaptor.RecommendedPopcornAdaptor; | ||
import com.example.domains.recommendedPopcorn.entity.RecommendedPopcorn; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Random; | ||
|
||
@UseCase | ||
@RequiredArgsConstructor | ||
public class GetRecommendedRandomPopcornUseCase { | ||
private final RecommendedPopcornAdaptor recommendedPopcornAdaptor; | ||
|
||
|
||
public List<RecommendedPopcorn> execute() { | ||
List<RecommendedPopcorn> recommendedPopcornList = recommendedPopcornAdaptor.findByThreeIds(); | ||
return recommendedPopcornList; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...src/main/java/com/example/domains/recommendedPopcorn/exceptions/NoRecommendedPopcorn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.example.domains.recommendedPopcorn.exceptions; | ||
|
||
import com.example.error.BaseErrorException; | ||
|
||
public class NoRecommendedPopcorn extends BaseErrorException { | ||
public static final BaseErrorException EXCEPTION = new NoRecommendedPopcorn(); | ||
|
||
private NoRecommendedPopcorn() { | ||
super(RecommendedErrorCode.NO_RECOMMENDED_POPCORN); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters