diff --git a/user-infrastructure/src/main/kotlin/com/xquare/v1userservice/user/repository/UserRepositoryImpl.kt b/user-infrastructure/src/main/kotlin/com/xquare/v1userservice/user/repository/UserRepositoryImpl.kt index 7a239c3..157aee9 100644 --- a/user-infrastructure/src/main/kotlin/com/xquare/v1userservice/user/repository/UserRepositoryImpl.kt +++ b/user-infrastructure/src/main/kotlin/com/xquare/v1userservice/user/repository/UserRepositoryImpl.kt @@ -26,6 +26,16 @@ class UserRepositoryImpl( private val reactiveQueryFactory: HibernateMutinyReactiveQueryFactory, private val userDomainMapper: UserDomainMapper ) : UserRepositorySpi { + + override suspend fun saveAll(user: List) { + val userAllSave = user.map { userDomainMapper.userDomainToEntity(it) } + reactiveQueryFactory.transactionWithFactory { session, _ -> + userAllSave.forEach { userEntity -> + session.persistUserEntityConcurrently(userEntity) + } + } + } + override suspend fun saveUser(user: User): User { val userEntityToSave = userDomainMapper.userDomainToEntity(user) reactiveQueryFactory.transactionWithFactory { session, _ ->