@@ -54,32 +54,60 @@ public void recheckAfterCancellation(Integer memberId, Task task, LocalDate date
5454 }
5555
5656 // ========== 데일리 ==========
57-
5857 private void checkDailyCompletion (Integer memberId , LocalDate date ) {
59- if (dailyCompletionLogRepository .existsByMemberIdAndCompletedDate (memberId , date )) {
58+ System .out .println ("━━━━━━━━━━━━━━━━━━━━━━━━━━" );
59+ System .out .println ("🔍 checkDailyCompletion 시작" );
60+ System .out .println ("memberId: " + memberId );
61+ System .out .println ("date: " + date );
62+
63+ boolean alreadyCompleted = dailyCompletionLogRepository .existsByMemberIdAndCompletedDate (memberId , date );
64+ System .out .println ("이미 완료?: " + alreadyCompleted );
65+
66+ if (alreadyCompleted ) {
67+ System .out .println ("❌ 이미 완료됨 - 리턴" );
68+ System .out .println ("━━━━━━━━━━━━━━━━━━━━━━━━━━" );
6069 return ;
6170 }
6271
72+ System .out .println ("데일리 진행률 계산 중..." );
6373 Integer progress = calculateService .calculateDailyProgress (memberId , date );
74+ System .out .println ("데일리 진행률: " + progress + "%" );
6475
6576 if (progress >= 80 ) {
77+ System .out .println ("✅ 진행률 80% 이상!" );
78+
79+ System .out .println ("DailyCompletionLog 저장 중..." );
6680 dailyCompletionLogRepository .save (DailyCompletionLog .builder ()
6781 .memberId (memberId )
6882 .completedDate (date )
6983 .build ());
84+ System .out .println ("✅ DailyCompletionLog 저장 완료!" );
7085
86+ System .out .println ("통계 업데이트 중..." );
7187 statisticsService .onDailyCompleted (memberId , date );
88+ System .out .println ("✅ 통계 업데이트 완료!" );
7289
90+ System .out .println ("데일리 보상 지급 중..." );
7391 try {
7492 rewardService .giveRewardByType (memberId , RewardType .DAILYCLEAR );
75- } catch (Exception ignored ) {
93+ System .out .println ("✅ 데일리 보상 지급 완료!" );
94+ } catch (Exception e ) {
95+ System .out .println ("❌ 데일리 보상 지급 실패: " + e .getMessage ());
96+ e .printStackTrace ();
7697 }
7798
99+ System .out .println ("데일리 이벤트 발행 중..." );
78100 applicationEventPublisher .publishEvent (DailyCompletedEvent .builder ()
79101 .memberId (memberId )
80102 .completedDate (date )
81103 .build ());
104+ System .out .println ("✅ 데일리 이벤트 발행 완료!" );
105+
106+ System .out .println ("✅✅✅ checkDailyCompletion 전체 완료!" );
107+ } else {
108+ System .out .println ("❌ 진행률 부족: " + progress + "% < 80%" );
82109 }
110+ System .out .println ("━━━━━━━━━━━━━━━━━━━━━━━━━━" );
83111 }
84112
85113 private void recheckDailyCompletion (Integer memberId , LocalDate date ) {
@@ -151,6 +179,7 @@ private void recheckWeeklyCompletion(Integer memberId, SubGoal subGoal) {
151179 // ========== 미션 ==========
152180
153181 private void checkMissionCompletion (Integer memberId , Mission mission ) {
182+
154183 if (missionCompletionLogRepository .existsByMissionIdAndMemberId (mission .getId (), memberId )) {
155184 return ;
156185 }
0 commit comments