diff --git a/Api/src/main/java/com/example/api/recommendedPopcorn/service/GetRecommendedPopocornUseCase.java b/Api/src/main/java/com/example/api/recommendedPopcorn/application/GetRecommendedPopocornUseCase.java similarity index 90% rename from Api/src/main/java/com/example/api/recommendedPopcorn/service/GetRecommendedPopocornUseCase.java rename to Api/src/main/java/com/example/api/recommendedPopcorn/application/GetRecommendedPopocornUseCase.java index a044018..1ca39b2 100644 --- a/Api/src/main/java/com/example/api/recommendedPopcorn/service/GetRecommendedPopocornUseCase.java +++ b/Api/src/main/java/com/example/api/recommendedPopcorn/application/GetRecommendedPopocornUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.recommendedPopcorn.service; +package com.example.api.recommendedPopcorn.application; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/recommendedPopcorn/service/GetRecommendedRandomPopcornUseCase.java b/Api/src/main/java/com/example/api/recommendedPopcorn/application/GetRecommendedRandomPopcornUseCase.java similarity index 91% rename from Api/src/main/java/com/example/api/recommendedPopcorn/service/GetRecommendedRandomPopcornUseCase.java rename to Api/src/main/java/com/example/api/recommendedPopcorn/application/GetRecommendedRandomPopcornUseCase.java index 2d34405..3f85ebd 100644 --- a/Api/src/main/java/com/example/api/recommendedPopcorn/service/GetRecommendedRandomPopcornUseCase.java +++ b/Api/src/main/java/com/example/api/recommendedPopcorn/application/GetRecommendedRandomPopcornUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.recommendedPopcorn.service; +package com.example.api.recommendedPopcorn.application; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/recommendedPopcorn/service/PostRecommendPopcornUseCase.java b/Api/src/main/java/com/example/api/recommendedPopcorn/application/PostRecommendPopcornUseCase.java similarity index 99% rename from Api/src/main/java/com/example/api/recommendedPopcorn/service/PostRecommendPopcornUseCase.java rename to Api/src/main/java/com/example/api/recommendedPopcorn/application/PostRecommendPopcornUseCase.java index 091a6e4..9eef22b 100644 --- a/Api/src/main/java/com/example/api/recommendedPopcorn/service/PostRecommendPopcornUseCase.java +++ b/Api/src/main/java/com/example/api/recommendedPopcorn/application/PostRecommendPopcornUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.recommendedPopcorn.service; +package com.example.api.recommendedPopcorn.application; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/recommendedPopcorn/service/PostVoteRecommendedPopcorn.java b/Api/src/main/java/com/example/api/recommendedPopcorn/application/PostVoteRecommendedPopcorn.java similarity index 88% rename from Api/src/main/java/com/example/api/recommendedPopcorn/service/PostVoteRecommendedPopcorn.java rename to Api/src/main/java/com/example/api/recommendedPopcorn/application/PostVoteRecommendedPopcorn.java index f8a4e80..8f9fed0 100644 --- a/Api/src/main/java/com/example/api/recommendedPopcorn/service/PostVoteRecommendedPopcorn.java +++ b/Api/src/main/java/com/example/api/recommendedPopcorn/application/PostVoteRecommendedPopcorn.java @@ -1,4 +1,4 @@ -package com.example.api.recommendedPopcorn.service; +package com.example.api.recommendedPopcorn.application; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/recommendedPopcorn/controller/RecommendedPopcornController.java b/Api/src/main/java/com/example/api/recommendedPopcorn/controller/RecommendedPopcornController.java index 51286d7..073ba92 100644 --- a/Api/src/main/java/com/example/api/recommendedPopcorn/controller/RecommendedPopcornController.java +++ b/Api/src/main/java/com/example/api/recommendedPopcorn/controller/RecommendedPopcornController.java @@ -1,11 +1,11 @@ package com.example.api.recommendedPopcorn.controller; +import com.example.api.recommendedPopcorn.application.GetRecommendedPopocornUseCase; +import com.example.api.recommendedPopcorn.application.GetRecommendedRandomPopcornUseCase; +import com.example.api.recommendedPopcorn.application.PostRecommendPopcornUseCase; +import com.example.api.recommendedPopcorn.application.PostVoteRecommendedPopcorn; import com.example.api.recommendedPopcorn.dto.request.RecommendedPopcornRequest; -import com.example.api.recommendedPopcorn.service.GetRecommendedPopocornUseCase; -import com.example.api.recommendedPopcorn.service.GetRecommendedRandomPopcornUseCase; -import com.example.api.recommendedPopcorn.service.PostRecommendPopcornUseCase; -import com.example.api.recommendedPopcorn.service.PostVoteRecommendedPopcorn; import com.example.domains.recommendedPopcorn.entity.RecommendedPopcorn; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.security.SecurityRequirement; diff --git a/Api/src/main/java/com/example/api/screening/service/BookMarkScreeningUseCase.java b/Api/src/main/java/com/example/api/screening/api/BookMarkScreeningUseCase.java similarity index 98% rename from Api/src/main/java/com/example/api/screening/service/BookMarkScreeningUseCase.java rename to Api/src/main/java/com/example/api/screening/api/BookMarkScreeningUseCase.java index ca7d613..0e78cee 100644 --- a/Api/src/main/java/com/example/api/screening/service/BookMarkScreeningUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/BookMarkScreeningUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetBookMarkedScreeningsUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetBookMarkedScreeningsUseCase.java similarity index 95% rename from Api/src/main/java/com/example/api/screening/service/GetBookMarkedScreeningsUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetBookMarkedScreeningsUseCase.java index ba8a10d..dbfc54b 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetBookMarkedScreeningsUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetBookMarkedScreeningsUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetBookmarkedUpcomingScreeningsUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetBookmarkedUpcomingScreeningsUseCase.java similarity index 93% rename from Api/src/main/java/com/example/api/screening/service/GetBookmarkedUpcomingScreeningsUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetBookmarkedUpcomingScreeningsUseCase.java index cfdd5e9..aec602d 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetBookmarkedUpcomingScreeningsUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetBookmarkedUpcomingScreeningsUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetMostRecentScreeningUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetMostRecentScreeningUseCase.java similarity index 91% rename from Api/src/main/java/com/example/api/screening/service/GetMostRecentScreeningUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetMostRecentScreeningUseCase.java index 02f8513..ddb6779 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetMostRecentScreeningUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetMostRecentScreeningUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetMostReviewedUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetMostReviewedUseCase.java similarity index 91% rename from Api/src/main/java/com/example/api/screening/service/GetMostReviewedUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetMostReviewedUseCase.java index fabb5a6..e9087e0 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetMostReviewedUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetMostReviewedUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetMyScreeningUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetMyScreeningUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/GetMyScreeningUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetMyScreeningUseCase.java index 620dcc9..db623a4 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetMyScreeningUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetMyScreeningUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetPastScreeningListUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetPastScreeningListUseCase.java similarity index 95% rename from Api/src/main/java/com/example/api/screening/service/GetPastScreeningListUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetPastScreeningListUseCase.java index 1701420..813a3b9 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetPastScreeningListUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetPastScreeningListUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetRateCountUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetRateCountUseCase.java similarity index 98% rename from Api/src/main/java/com/example/api/screening/service/GetRateCountUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetRateCountUseCase.java index a0751be..27502aa 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetRateCountUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetRateCountUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetReviewListUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetReviewListUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/GetReviewListUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetReviewListUseCase.java index acca77b..ed3f061 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetReviewListUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetReviewListUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetReviewUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetReviewUseCase.java similarity index 95% rename from Api/src/main/java/com/example/api/screening/service/GetReviewUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetReviewUseCase.java index 8799cb1..7c514e3 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetReviewUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetReviewUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetScreeningListUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetScreeningListUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/GetScreeningListUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetScreeningListUseCase.java index 4514935..b788ddc 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetScreeningListUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetScreeningListUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetScreeningReviewListUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetScreeningReviewListUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/GetScreeningReviewListUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetScreeningReviewListUseCase.java index 4983f3b..b9c0f61 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetScreeningReviewListUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetScreeningReviewListUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetScreeningStatisticsUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetScreeningStatisticsUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/GetScreeningStatisticsUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetScreeningStatisticsUseCase.java index 63bf437..3fb9248 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetScreeningStatisticsUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetScreeningStatisticsUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetScreeningUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetScreeningUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/GetScreeningUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetScreeningUseCase.java index 6fa11ce..2989462 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetScreeningUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetScreeningUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/GetThisWeekScreeningsUseCase.java b/Api/src/main/java/com/example/api/screening/api/GetThisWeekScreeningsUseCase.java similarity index 91% rename from Api/src/main/java/com/example/api/screening/service/GetThisWeekScreeningsUseCase.java rename to Api/src/main/java/com/example/api/screening/api/GetThisWeekScreeningsUseCase.java index a53daa1..5015598 100644 --- a/Api/src/main/java/com/example/api/screening/service/GetThisWeekScreeningsUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/GetThisWeekScreeningsUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/PatchScreeningUseCase.java b/Api/src/main/java/com/example/api/screening/api/PatchScreeningUseCase.java similarity index 97% rename from Api/src/main/java/com/example/api/screening/service/PatchScreeningUseCase.java rename to Api/src/main/java/com/example/api/screening/api/PatchScreeningUseCase.java index 7e2176f..79e25d2 100644 --- a/Api/src/main/java/com/example/api/screening/service/PatchScreeningUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/PatchScreeningUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/PostReviewComplainUseCase.java b/Api/src/main/java/com/example/api/screening/api/PostReviewComplainUseCase.java similarity index 91% rename from Api/src/main/java/com/example/api/screening/service/PostReviewComplainUseCase.java rename to Api/src/main/java/com/example/api/screening/api/PostReviewComplainUseCase.java index 50fcc6b..2fea4ad 100644 --- a/Api/src/main/java/com/example/api/screening/service/PostReviewComplainUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/PostReviewComplainUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/PostReviewUseCase.java b/Api/src/main/java/com/example/api/screening/api/PostReviewUseCase.java similarity index 98% rename from Api/src/main/java/com/example/api/screening/service/PostReviewUseCase.java rename to Api/src/main/java/com/example/api/screening/api/PostReviewUseCase.java index c374bfb..b355fb1 100644 --- a/Api/src/main/java/com/example/api/screening/service/PostReviewUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/PostReviewUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; @@ -56,6 +56,15 @@ private PostReviewResponse reviewUpload( request.getNegative()); Screening screening = screeningAdaptor.findById(userScreening.getScreening().getId()); + updateScreeningRate(request, screening); + + // save + reviewAdaptor.save(newSreeningReview); + // screeningAdaptor.save(screening); + return PostReviewResponse.from(newSreeningReview); + } + + public synchronized void updateScreeningRate(PostReviewRequest request, Screening screening) { calculateCount( request.isScreeningReview(), request.isLocationReview(), @@ -64,11 +73,6 @@ private PostReviewResponse reviewUpload( calculateRate(request.isAfterScreening(), screening); incrementNegative(request.getNegative(), screening); incrementPositive(request.getPositive(), screening); - - // save - reviewAdaptor.save(newSreeningReview); - // screeningAdaptor.save(screening); - return PostReviewResponse.from(newSreeningReview); } @Transactional diff --git a/Api/src/main/java/com/example/api/screening/service/PostScreeningPrivateUseCase.java b/Api/src/main/java/com/example/api/screening/api/PostScreeningPrivateUseCase.java similarity index 96% rename from Api/src/main/java/com/example/api/screening/service/PostScreeningPrivateUseCase.java rename to Api/src/main/java/com/example/api/screening/api/PostScreeningPrivateUseCase.java index dc1eae7..1a74753 100644 --- a/Api/src/main/java/com/example/api/screening/service/PostScreeningPrivateUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/PostScreeningPrivateUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/service/ScreeningUploadUseCase.java b/Api/src/main/java/com/example/api/screening/api/ScreeningUploadUseCase.java similarity index 98% rename from Api/src/main/java/com/example/api/screening/service/ScreeningUploadUseCase.java rename to Api/src/main/java/com/example/api/screening/api/ScreeningUploadUseCase.java index d1a9d6e..ecd8dee 100644 --- a/Api/src/main/java/com/example/api/screening/service/ScreeningUploadUseCase.java +++ b/Api/src/main/java/com/example/api/screening/api/ScreeningUploadUseCase.java @@ -1,4 +1,4 @@ -package com.example.api.screening.service; +package com.example.api.screening.api; import com.example.adaptor.UseCase; diff --git a/Api/src/main/java/com/example/api/screening/controller/ScreeningController.java b/Api/src/main/java/com/example/api/screening/controller/ScreeningController.java index 793ce8f..81c24d4 100644 --- a/Api/src/main/java/com/example/api/screening/controller/ScreeningController.java +++ b/Api/src/main/java/com/example/api/screening/controller/ScreeningController.java @@ -2,10 +2,10 @@ import com.example.api.config.response.SuccessResponse; +import com.example.api.screening.api.*; import com.example.api.screening.dto.request.PostReviewRequest; import com.example.api.screening.dto.request.PostScreeningRequest; import com.example.api.screening.dto.response.*; -import com.example.api.screening.service.*; import com.example.domains.common.util.SliceResponse; import com.example.domains.common.util.SliceUtil; import com.example.domains.screening.adaptor.ScreeningAdaptor; diff --git a/Domain/src/main/java/com/example/domains/screeningReview/entity/enums/Positive.java b/Domain/src/main/java/com/example/domains/screeningReview/entity/enums/Positive.java index d9440de..d1535a5 100644 --- a/Domain/src/main/java/com/example/domains/screeningReview/entity/enums/Positive.java +++ b/Domain/src/main/java/com/example/domains/screeningReview/entity/enums/Positive.java @@ -29,4 +29,23 @@ public class Positive { private boolean actingIsGood = false; private boolean chemistryIsGood = false; + // @Builder + // private Positive() { + // this.cineMaster = false; + // this.greatFilming = false; + // this.pom = false; + // this.animationIsGood = false; + // this.artIsGood = false; + // this.setIsArt = false; + // this.custom = false; + // this.music = false; + // this.ost = false; + // this.writtenByGod = false; + // this.topicIsGood = false; + // this.linesAreGood = false; + // this.endingIsGood = false; + // this.castingIsGood = false; + // this.actingIsGood = false; + // this.chemistryIsGood = false; + // } }