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

Feat : 퀘스트 목표 변경 기능을 구현한다 #25 #59

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

chaen-ing
Copy link
Member

#️⃣연관된 이슈

#25

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

  • 퀘스트 초기화 컨트롤러 로직 수정
  • 사용자 별 퀘스트 테이블을 따로 생성하여 목표 변경, 조회 할 수 있도록 변경

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

@chaen-ing chaen-ing requested a review from chanmin-00 February 5, 2025 14:20
@chaen-ing chaen-ing self-assigned this Feb 5, 2025
Copy link
Member

@chanmin-00 chanmin-00 left a comment

Choose a reason for hiding this comment

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

엄청 복잡한 기능이었는데 정말 잘 짜신거 같아요 수고하셨습니다!!

}

@Scheduled(cron = "0 0 0 * * ?") // 매일 0시 0분 0초에 실행
@Scheduled(cron = "30 0 0 * * ?") // 매일 0시 0분 30초에 실행
Copy link
Member

Choose a reason for hiding this comment

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

오 세심하네요

case "QUIZ" -> quest.updateQuizCompleted();
case "CONCEPT" -> quest.updateConceptCompleted();
case "QUIZ" -> quest.updateQuizCompletedCount();
case "CONCEPT" -> quest.updateConceptCompletedCount();
case "ARTICLE" -> quest.updateArticleCompletedCount();
default -> throw new UserException(INVALID_QUEST_TYPE);
}

// 퀘스트 3개 완료 시 출석 완료 처리
Copy link
Member

Choose a reason for hiding this comment

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

여기 주석 변경해야 하는거 맞죠?

@@ -113,6 +124,8 @@ public void createAttendance(User user) {
questRepository.save(Quest.builder().user(user).lastUpdatedDate(today).build());
attendanceLogRepository.save(
AttendanceLog.builder().date(today).isAttended(false).attendance(attendance).build());
userGoalRepository.save(
UserGoal.builder().user(user).quizGoal(1).articleGoal(3).conceptGoal(1).build());
Copy link
Member

Choose a reason for hiding this comment

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

이게 사용자 목표 기본 설정값인거가요?

Copy link
Member

@chanmin-00 chanmin-00 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!!

@chaen-ing chaen-ing merged commit 63798d7 into develop Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants