-
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.
- Loading branch information
1 parent
dec28a9
commit 9e6b2bf
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...r/src/main/java/com/neo/needeachother/category/application/CategoryVoteFilterService.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,37 @@ | ||
package com.neo.needeachother.category.application; | ||
|
||
import com.neo.needeachother.category.domain.Category; | ||
import com.neo.needeachother.category.domain.CategoryId; | ||
import com.neo.needeachother.category.domain.domainservice.ConfirmCategoryChangeableAdminService; | ||
import com.neo.needeachother.category.domain.repository.CategoryRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import static com.neo.needeachother.category.application.CategoryServiceHelper.*; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class CategoryVoteFilterService { | ||
|
||
private final CategoryRepository categoryRepository; | ||
private final ConfirmCategoryChangeableAdminService confirmCategoryChangeableAdminService; | ||
|
||
@Transactional | ||
public void modifyFilteringRate(CategoryId categoryId, String email, int changingRate){ | ||
Category foundCategory = findExistingCategory(categoryRepository, categoryId); | ||
foundCategory.modifyFilteringRate(confirmCategoryChangeableAdminService, email, changingRate); | ||
} | ||
|
||
@Transactional | ||
public void useFilter(CategoryId categoryId, String email){ | ||
Category foundCategory = findExistingCategory(categoryRepository, categoryId); | ||
foundCategory.turnOnCommentRatingFilter(confirmCategoryChangeableAdminService, email); | ||
} | ||
|
||
@Transactional | ||
public void notUseFilter(CategoryId categoryId, String email){ | ||
Category foundCategory = findExistingCategory(categoryRepository, categoryId); | ||
foundCategory.turnOffCommentRatingFilter(confirmCategoryChangeableAdminService, email); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...ain/java/com/neo/needeachother/category/application/ModifyCategoryInformationService.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,25 @@ | ||
package com.neo.needeachother.category.application; | ||
|
||
import com.neo.needeachother.category.domain.Category; | ||
import com.neo.needeachother.category.domain.CategoryId; | ||
import com.neo.needeachother.category.domain.domainservice.ConfirmCategoryChangeableAdminService; | ||
import com.neo.needeachother.category.domain.repository.CategoryRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import static com.neo.needeachother.category.application.CategoryServiceHelper.*; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class ModifyCategoryInformationService { | ||
|
||
private final CategoryRepository categoryRepository; | ||
private final ConfirmCategoryChangeableAdminService confirmCategoryChangeableAdminService; | ||
|
||
@Transactional | ||
public void changeCategoryTitle(CategoryId categoryId, String email, String title){ | ||
Category foundCategory = findExistingCategory(categoryRepository, categoryId); | ||
foundCategory.modifyCategoryTitle(confirmCategoryChangeableAdminService, email, title); | ||
} | ||
} |
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