File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
storage/rdb/src/main/kotlin/com/gotchai/storage/rdb/user Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1+ SPRING_PROFILES_ACTIVE : local
Original file line number Diff line number Diff line change 1+ dependencies {}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package com.gotchai.storage.rdb.user.adapter.out
33import com.gotchai.domain.user.entity.Profile
44import com.gotchai.domain.user.port.out.ProfileCommandPort
55import com.gotchai.storage.rdb.global.annotation.Adapter
6- import com.gotchai.storage.rdb.global.util.findByIdOrElseThrow
76import com.gotchai.storage.rdb.user.entity.ProfileEntity
87import com.gotchai.storage.rdb.user.repository.ProfileJpaRepository
98
@@ -18,7 +17,7 @@ class ProfileCommandAdapter(
1817
1918 override fun deleteByUserId (userId : Long ) {
2019 profileJpaRepository
21- .findByIdOrElseThrow (userId)
22- .softDelete()
20+ .findByUserId (userId)
21+ ? .softDelete()
2322 }
2423}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package com.gotchai.storage.rdb.user.adapter.out
33import com.gotchai.domain.user.entity.UserSocial
44import com.gotchai.domain.user.port.out.UserSocialCommandPort
55import com.gotchai.storage.rdb.global.annotation.Adapter
6- import com.gotchai.storage.rdb.global.util.findByIdOrElseThrow
76import com.gotchai.storage.rdb.user.entity.UserSocialEntity
87import com.gotchai.storage.rdb.user.repository.UserSocialJpaRepository
98
@@ -18,7 +17,7 @@ class UserSocialCommandAdapter(
1817
1918 override fun deleteByUserId (userId : Long ) {
2019 userSocialJpaRepository
21- .findByIdOrElseThrow (userId)
22- .softDelete()
20+ .findByUserId (userId)
21+ ? .softDelete()
2322 }
2423}
Original file line number Diff line number Diff line change @@ -4,5 +4,7 @@ import com.gotchai.storage.rdb.user.entity.UserSocialEntity
44import org.springframework.data.jpa.repository.JpaRepository
55
66interface UserSocialJpaRepository : JpaRepository <UserSocialEntity , Long > {
7+ fun findByUserId (userId : Long ): UserSocialEntity ?
8+
79 fun findBySocialIdAndDeletedAtIsNull (socialId : String ): UserSocialEntity ?
810}
You can’t perform that action at this time.
0 commit comments