From 8d46b5984b63f546e6f4bb7c04ff703b4f41318f Mon Sep 17 00:00:00 2001 From: JaeUk Date: Sun, 19 May 2024 19:15:37 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20#70=20=ED=9A=8C=EC=9B=90=ED=83=88?= =?UTF-8?q?=ED=87=B4=20=EC=8B=9C=20FK=20constraints=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=20=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/service/UserCommandService.java | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/ajou/hertz/domain/user/service/UserCommandService.java b/src/main/java/com/ajou/hertz/domain/user/service/UserCommandService.java index 09737f0..2f32ea7 100644 --- a/src/main/java/com/ajou/hertz/domain/user/service/UserCommandService.java +++ b/src/main/java/com/ajou/hertz/domain/user/service/UserCommandService.java @@ -1,32 +1,27 @@ package com.ajou.hertz.domain.user.service; -import java.util.UUID; - -import com.ajou.hertz.domain.instrument.service.InstrumentCommandService; -import com.ajou.hertz.domain.instrument.service.InstrumentQueryService; -import com.ajou.hertz.domain.practice_room.entity.PracticeRoom; -import com.ajou.hertz.domain.practice_room.service.PracticeRoomCommandService; -import com.ajou.hertz.domain.practice_room.service.PracticeRoomQueryService; -import com.ajou.hertz.domain.user.controller.UpdatePasswordWithoutAuthenticationRequest; -import com.ajou.hertz.domain.user.exception.UserDeletionPermissionDeniedException; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import org.springframework.web.multipart.MultipartFile; - import com.ajou.hertz.common.kakao.dto.response.KakaoUserInfoResponse; import com.ajou.hertz.common.properties.HertzProperties; +import com.ajou.hertz.domain.instrument.service.InstrumentCommandService; +import com.ajou.hertz.domain.practice_room.service.PracticeRoomCommandService; import com.ajou.hertz.domain.user.constant.Gender; +import com.ajou.hertz.domain.user.controller.UpdatePasswordWithoutAuthenticationRequest; import com.ajou.hertz.domain.user.dto.UserDto; import com.ajou.hertz.domain.user.dto.request.SignUpRequest; import com.ajou.hertz.domain.user.entity.User; +import com.ajou.hertz.domain.user.exception.UserDeletionPermissionDeniedException; import com.ajou.hertz.domain.user.exception.UserEmailDuplicationException; import com.ajou.hertz.domain.user.exception.UserKakaoUidDuplicationException; import com.ajou.hertz.domain.user.exception.UserPhoneDuplicationException; import com.ajou.hertz.domain.user.repository.UserRepository; - import lombok.RequiredArgsConstructor; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.util.UUID; @RequiredArgsConstructor @Transactional @@ -205,8 +200,8 @@ public void deleteUser(Long requesterId, Long userId) { practiceRoomCommandService.removeSellerFromPracticeRooms(userId); // TODO: 공연장(ConcertHall)에서 유저 제거 (연관관계 끊기) - userRepository.deleteById(userId); userProfileImageCommandService.deleteImagesByUserId(userId); + userRepository.deleteById(userId); // TODO: 유저 탈퇴 이력 저장 }