From 02659982ad28d9efd347c547615fca57690f4002 Mon Sep 17 00:00:00 2001 From: kseysh Date: Wed, 30 Oct 2024 21:19:44 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20=EC=86=9D=ED=83=AC=ED=94=84=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=20=EC=82=AD=EC=A0=9C=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=20(#336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/sopt/app/application/soptamp/SoptampUserService.java | 4 ++++ .../sopt/app/interfaces/postgres/SoptampUserRepository.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/org/sopt/app/application/soptamp/SoptampUserService.java b/src/main/java/org/sopt/app/application/soptamp/SoptampUserService.java index d58be7f1..104bc278 100755 --- a/src/main/java/org/sopt/app/application/soptamp/SoptampUserService.java +++ b/src/main/java/org/sopt/app/application/soptamp/SoptampUserService.java @@ -122,4 +122,8 @@ public void initAllSoptampUserPoints() { soptampUserList.forEach(SoptampUser::initTotalPoints); soptampUserRepository.saveAll(soptampUserList); } + + public void deleteSoptampUser(Long userId) { + soptampUserRepository.deleteByUserId(userId); + } } \ No newline at end of file diff --git a/src/main/java/org/sopt/app/interfaces/postgres/SoptampUserRepository.java b/src/main/java/org/sopt/app/interfaces/postgres/SoptampUserRepository.java index 2f90ca0a..08b25eb9 100755 --- a/src/main/java/org/sopt/app/interfaces/postgres/SoptampUserRepository.java +++ b/src/main/java/org/sopt/app/interfaces/postgres/SoptampUserRepository.java @@ -16,4 +16,6 @@ public interface SoptampUserRepository extends JpaRepository List findAllByGeneration(Long generation); boolean existsByNickname(String nickname); + + void deleteByUserId(Long userId); }