diff --git a/src/main/java/synk/meeteam/domain/user/user/service/UserManagementService.java b/src/main/java/synk/meeteam/domain/user/user/service/UserManagementService.java index 7c8c84fd..b5099a38 100644 --- a/src/main/java/synk/meeteam/domain/user/user/service/UserManagementService.java +++ b/src/main/java/synk/meeteam/domain/user/user/service/UserManagementService.java @@ -40,7 +40,6 @@ public class UserManagementService { // 구인 관련 private final RecruitmentPostRepository recruitmentPostRepository; private final RecruitmentRoleRepository recruitmentRoleRepository; - private final RecruitmentRoleSkillRepository recruitmentRoleSkillRepository; private final RecruitmentTagRepository recruitmentTagRepository; private final RecruitmentCommentRepository recruitmentCommentRepository; private final RecruitmentApplicantRepository recruitmentApplicantRepository; @@ -52,11 +51,15 @@ public class UserManagementService { public void deleteUser(User user) { List postIds = recruitmentPostRepository.findAllByCreatedBy(user.getId()).stream() .map(RecruitmentPost::getId).toList(); - deleteRecruitmentPosts(postIds); + if(!postIds.isEmpty()) { + deleteRecruitmentPosts(postIds); + } List portfolioIds = portfolioRepository.findAllByCreatedBy(user.getId()) .stream().map(Portfolio::getId).toList(); - deletePortfolios(portfolioIds); + if(!portfolioIds.isEmpty()){ + deletePortfolios(portfolioIds); + } deleteProfile(user.getId()); deleteRelatedUserData(user.getId());