Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#86 - 사용자의 기본 프로필을 설정 및 차단된 유저의 프로필을 설정한다 #89

Merged
merged 26 commits into from
Aug 15, 2024

Conversation

sectionr0
Copy link
Contributor

1. 🔗 관련 이슈

2. 📄 구현한 내용 또는 수정한 내용

  • Gender 추가
  • data.sql 추가
  • 프로필 수정 변경
  • lastCursorId 추가
  • 기본 프로필 이미지 추가

3. 🙌 추가적으로 알리고 싶은 내용

  • data.sql 에 제가 테스트 더미 데이터 넣어놨어요!
    투표 쪽은 재연짱이 담당해서 일단 노션에 있는 것만 넣었습니다! 추가적으로 더 넣어주세요!

(config 에 validate로 바꿔도 될 것 같네요 이젠👀)

4. 🙄 TODO / 고민하고 있는 것들

5. ✅ 배포 Checklist

  • 본인을 Assign 해주세요.
  • 본인을 제외한 백엔드 개발자를 리뷰어로 지정해주세요.
  • 변경된 DB 업데이트 해주세요. (꼭 해주세요 배포 안돼요!!!)

@sectionr0 sectionr0 added 🔧리팩터링🔧 리팩터링일까요 리팩토링일까요? 🥭망고🥭 24기 조기천 labels Aug 13, 2024
@sectionr0 sectionr0 self-assigned this Aug 13, 2024
Copy link
Contributor

@kpeel5839 kpeel5839 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했어요. 되게 간단간단하게 볼 수 있는 PR이었어서 딱히 코멘트 드릴 건 없네용. 호호

Comment on lines +8 to +17
@Configuration
@Profile("!local")
class TimeZoneConfig {

@PostConstruct
fun timeZoneSetUp() {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"))
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기천짱 미안해요. 여기다가 커밋 끼워넣었어잉 봐줘잉

image

이전에는 timezone 설정이 제대로 되어 있지 않아, 투표 독려도 정확하지 않은 시간에 들어갔었어요.

하지만, 이 설정으로 인해, 투표 독려가 실행되는 시각인 9,15,21시 중 9시에 정확히 잘 실행되는 것을 볼 수 있어요.

@@ -15,7 +16,7 @@ object AuthFixture {
return SignUpRequest(
signUpToken = "signUpToken",
name = "Test User",
gender = "male",
gender = Gender.MALE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오우 쮓, 이거 Notification과 관련이 있는뎅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 좀만 커밋 밀어넣을게용 허허허 ^.^

@@ -11,7 +12,7 @@ class ReceivedVoteNotificationServiceTest : BehaviorSpec({
given("남학생이 투표를 완료했을 때") {
val service = ReceivedVoteNotificationService()
`when`("투표를 받은이에게") {
val notification = service.getNotification(100L, "female")
val notification = service.getNotification(100L, Gender.FEMALE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

머야 자기야 바꿔줬네? 대-박

@@ -29,7 +30,7 @@ object UserFixture {
role = Role.USER,
name = "TestUser",
introduction = UserIntroduction.from("hello"),
gender = "male",
gender = Gender.MALE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자기야 이걸로 인해서 Postman 스펙도 조금 바뀌었엉 확인해줘잉

Comment on lines +13 to +14
hasNext = hasNext,
lastCursorId = messages.lastOrNull()?.id ?: 0L
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굳굳!

import org.springframework.stereotype.Component
import java.time.LocalDate

@Component
class ReceivedVoteNotificationService {

fun getNotification(userId: Long, gender: String): Notification {
fun getNotification(userId: Long, gender: Gender): Notification {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아니 이거 어떻게 알고 바꿔줬어요?? 어디서 컴파일 에러 떴나?? 어떻게 알았지;;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

아 여기서 떴구나, 굳굳!

@github-actions github-actions bot added the 🌟머지 해주세요🌟 머지해주셔! label Aug 14, 2024
Comment on lines +38 to +50
val updatedIntroduction = profile.introduction ?: loginUser.introduction.introduction
val updatedProfile = loginUser.profile.update(
backgroundColor = profile.profile?.backgroundColor ?: loginUser.profile.backgroundColor,
iconUrl = profile.profile?.iconUrl ?: loginUser.profile.iconUrl
)

val updateProfile = loginUser.profile.update(
backgroundColor = profile.profile.backgroundColor,
iconUrl = profile.profile.iconUrl
val updatedUser = loginUser.copy(
introduction = UserIntroduction.from(updatedIntroduction),
profile = updatedProfile
)

profilePort.save(updateProfile)
userPort.save(updateIntroduction)
profilePort.save(updatedProfile)
userPort.save(updatedUser)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

근데, 차단된 유저의 프로필 설정은 어디있나요? 기존 코드로 가더라도 괜찮아서 변경사항에 포함안되어 있는건가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금 추가하려고요,,, 3시간 전에 받았어용

@kpeel5839 kpeel5839 merged commit 6927ef3 into develop Aug 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟머지 해주세요🌟 머지해주셔! 🔧리팩터링🔧 리팩터링일까요 리팩토링일까요? 🥭망고🥭 24기 조기천
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants