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

[Fix/#417] 멤버가 구독 전송 시간을 변경한 상태로 추가 구독하여도 기본 구독 전송 시간으로 생성되는 문제 해결 #418

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

belljun3395
Copy link
Collaborator

🎫 연관 이슈

resolved: #417

💁‍♂️ PR 내용

  • 멤버가 구독 전송 시간을 변경한 상태로 추가 구독하여도 기본 구독 전송 시간으로 생성되는 문제 해결

🙏 작업

[As-IS]
기존에는 멤버가 구독을 하면 기본 구독 전송 정보 (평일/8시)로 구독이 생성되었습니다.
[To-BE]
현재 구독하고 있는 학습지가 있다면 해당 학습지를 기준으로 구독이 생성될 수 있도록 수정하였습니다.

🙈 PR 참고 사항

스크린샷 2024-09-20 오후 4 38 12

현재 구독하고 있는 학습지가 있다면 해당 학습지를 기준으로 구독이 생성되는 모습

스크린샷 2024-09-20 오후 4 39 24

현재 구독하고 있는 학습지가 없다면(삭제되었다면) 기본 구독 정보를 기준으로 구독이 생성되는 모습

📸 스크린샷

🤖 테스트 체크리스트

  • 체크 미완료
  • 체크 완료

@github-actions github-actions bot added the fix 기능을 고칠 때 사용됩니다 label Sep 20, 2024
Comment on lines +33 to +53
val command = subscriptionDao.selectSubscriptionSendStatus(
SelectSubscriptionSendStatusQuery(
memberId = memberId
)
).takeIf {
it.isNotEmpty()
}?.let {
/** 현재 구독 중인 정보가 있다면 해당 정보를 통해 구독 정보를 생성 */
InsertWorkbookSubscriptionCommand(
memberId = memberId,
workbookId = subTargetWorkbookId,
sendDay = it[0].sendDay,
sendTime = it[0].sendTime
)
} ?: run {
/** 현재 구독 중인 정보가 없다면 기본 정보로 구독 정보를 생성 */
InsertWorkbookSubscriptionCommand(
memberId = memberId,
workbookId = subTargetWorkbookId
)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

기존의 구독 정보를 조회한 후에 새로운 구독 정보를 생성합니다.

@belljun3395 belljun3395 merged commit ab6006d into dev Sep 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 기능을 고칠 때 사용됩니다
Projects
None yet
1 participant