-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feat/#85] 구독 취소 API 보정(unsubs_opinion 컬럼 추가) #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subscription테이블에 unsubs_opinion 컬럼 추가 관련 변경사항입니다
// 구독중이 아닌지 확인 | ||
CountWorkbookSubscriptionQuery(memberId = useCaseIn.memberId, workbookId = useCaseIn.workbookId).let { query -> | ||
subscriptionDao.selectCountWorkbookSubscription(query).let { cnt -> | ||
if (cnt == 0) { | ||
throw RuntimeException("Already subscribed") | ||
} | ||
} | ||
} | ||
|
||
subscriptionDao.updateDeletedAtInWorkbookSubscription( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구독 취소시 구독상태 체크 로직 삭제했어요
@@ -24,6 +24,7 @@ class SubscriptionDao( | |||
fun updateDeletedAtInWorkbookSubscription(command: UpdateDeletedAtInWorkbookSubscriptionCommand) { | |||
dslContext.update(SUBSCRIPTION) | |||
.set(SUBSCRIPTION.DELETED_AT, LocalDateTime.now()) | |||
.set(SUBSCRIPTION.UNSUBS_OPINION, command.opinion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구독 취소시 SUBSCRIPTION 테이블에 UNSUBS_OPINION 업데이트 하도록 쿼리 수정
-- subscription 테이블에 reason 컬럼 추가 (한국어로만 100자 가능) | ||
ALTER TABLE subscription | ||
ADD COLUMN unsubs_opinion VARCHAR(300) NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsubs_opinion 컬럼 추가 (flyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다~!
🎫 연관 이슈
resolved #85
💁♂️ PR 내용
🙏 작업
🙈 PR 참고 사항
📸 스크린샷
🤖 테스트 체크리스트