Skip to content

Commit

Permalink
Revert "feat: 회원가입 후 바로 3개 받도록 수정 (#560)"
Browse files Browse the repository at this point in the history
This reverts commit c3bc3c1.
  • Loading branch information
injoon2019 authored Nov 11, 2024
1 parent c3bc3c1 commit 7c64a7d
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -87,7 +87,6 @@ class AuthFacade(
hasCompleteUserProfile = userProfile != null,
hasCompleteIntroduction = userProfile?.hasCompleteIntroduction() ?: false,
).also {
log.info { "isSignUp: ${signInUpDto.isSignUp}" }
if (signInUpDto.isSignUp) {
applicationEventPublisher.publishEvent(
SignUpEventDto(
Original file line number Diff line number Diff line change
@@ -95,6 +95,7 @@ class BottleMatchingRepository(
UsersCanBeMatchedDto(
willMatchUserId = rs.getLong("willMatchUserId"),
willMatchUserGender = rs.getString("willMatchUserGender"),
willMatchCity = rs.getString("city")
)
}
)
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package com.nexters.bottles.app.bottle.repository.dto
data class UsersCanBeMatchedDto(
val willMatchUserId: Long,
val willMatchUserGender: String,
val willMatchCity: String? = null,
val willMatchCity: String,
)

data class UserProfileSelectDto(
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@ import com.nexters.bottles.app.bottle.service.BottleService
import com.nexters.bottles.app.common.component.FileService
import com.nexters.bottles.app.user.component.event.dto.UploadImageEventDto
import com.nexters.bottles.app.user.service.UserService
import mu.KotlinLogging
import org.springframework.context.event.EventListener
import org.springframework.scheduling.annotation.Async
import org.springframework.stereotype.Component
import org.springframework.transaction.event.TransactionalEventListener
@@ -20,14 +18,10 @@ class UserProfileApplicationEventListener(
private val fileService: FileService
) {

private val log = KotlinLogging.logger { }

@Async
@EventListener
@TransactionalEventListener
fun handleCustomEvent(event: SignUpEventDto) {
log.info { "SignUpEventDto" }
var savedBottles = bottleService.matchFirstRandomBottle(userId = event.userId, count = 3)
log.info { "savedBottles=$savedBottles" }
var savedBottles = bottleService.matchFirstRandomBottle(event.userId, 3)
savedBottles.forEach {
bottleHistoryService.saveMatchingHistory(sourceUserId = it.sourceUser.id, targetUserId = it.targetUser.id)
}

0 comments on commit 7c64a7d

Please sign in to comment.