33import com .recipe .app .src .fridge .application .FridgeService ;
44import com .recipe .app .src .fridgeBasket .application .FridgeBasketService ;
55import com .recipe .app .src .ingredient .application .IngredientService ;
6+ import com .recipe .app .src .recipe .application .RecipeScrapService ;
67import com .recipe .app .src .recipe .application .RecipeSearchService ;
78import com .recipe .app .src .recipe .application .RecipeService ;
9+ import com .recipe .app .src .recipe .application .RecipeViewService ;
810import com .recipe .app .src .recipe .application .blog .BlogScrapService ;
911import com .recipe .app .src .recipe .application .blog .BlogViewService ;
1012import com .recipe .app .src .recipe .application .youtube .YoutubeScrapService ;
1113import com .recipe .app .src .recipe .application .youtube .YoutubeViewService ;
1214import com .recipe .app .src .recipe .domain .Recipe ;
1315import com .recipe .app .src .user .application .dto .UserProfileResponse ;
16+ import com .recipe .app .src .user .application .dto .UserWithdrawRequest ;
1417import com .recipe .app .src .user .domain .User ;
1518import jakarta .servlet .http .HttpServletRequest ;
1619import org .springframework .stereotype .Service ;
@@ -24,6 +27,8 @@ public class UserFacadeService {
2427 private final UserService userService ;
2528 private final RecipeService recipeService ;
2629 private final RecipeSearchService recipeSearchService ;
30+ private final RecipeScrapService recipeScrapService ;
31+ private final RecipeViewService recipeViewService ;
2732 private final YoutubeScrapService youtubeScrapService ;
2833 private final YoutubeViewService youtubeViewService ;
2934 private final BlogScrapService blogScrapService ;
@@ -35,13 +40,16 @@ public class UserFacadeService {
3540 private static final int USER_PROFILE_RECIPE_CNT = 6 ;
3641
3742 public UserFacadeService (UserService userService , RecipeService recipeService , RecipeSearchService recipeSearchService ,
43+ RecipeScrapService recipeScrapService , RecipeViewService recipeViewService ,
3844 YoutubeScrapService youtubeScrapService , YoutubeViewService youtubeViewService ,
3945 BlogScrapService blogScrapService , BlogViewService blogViewService ,
4046 FridgeService fridgeService , FridgeBasketService fridgeBasketService , IngredientService ingredientService ) {
4147
4248 this .userService = userService ;
4349 this .recipeService = recipeService ;
4450 this .recipeSearchService = recipeSearchService ;
51+ this .recipeScrapService = recipeScrapService ;
52+ this .recipeViewService = recipeViewService ;
4553 this .youtubeScrapService = youtubeScrapService ;
4654 this .youtubeViewService = youtubeViewService ;
4755 this .blogScrapService = blogScrapService ;
@@ -64,17 +72,17 @@ public UserProfileResponse findUserProfile(User user) {
6472 }
6573
6674 @ Transactional
67- public void deleteUser (User user , HttpServletRequest request ) {
75+ public void deleteUser (User user , HttpServletRequest request , UserWithdrawRequest withdrawRequest ) {
6876
6977 fridgeService .deleteAllByUserId (user .getUserId ());
7078 fridgeBasketService .deleteAllByUserId (user .getUserId ());
71- recipeService .deleteAllByUserId (user .getUserId ());
72- ingredientService .deleteAllByUserId (user .getUserId ());
79+ recipeScrapService .deleteAllByUserId (user .getUserId ());
80+ recipeViewService .deleteAllByUserId (user .getUserId ());
7381 youtubeScrapService .deleteAllByUserId (user .getUserId ());
7482 youtubeViewService .deleteAllByUserId (user .getUserId ());
7583 blogScrapService .deleteAllByUserId (user .getUserId ());
7684 blogViewService .deleteAllByUserId (user .getUserId ());
7785
78- userService .withdraw (user , request );
86+ userService .withdraw (user , request , withdrawRequest );
7987 }
8088}
0 commit comments