Commit e216849921166a1555a612eb94e86d5793455117
1 parent
a5fbad31
【修复】MEMBER:会员签到记录 Bug
Showing
1 changed file
with
4 additions
and
3 deletions
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java
| @@ -75,11 +75,12 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService | @@ -75,11 +75,12 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService | ||
| 75 | } | 75 | } |
| 76 | summary.setTodaySignIn(DateUtils.isToday(lastRecord.getCreateTime())); | 76 | summary.setTodaySignIn(DateUtils.isToday(lastRecord.getCreateTime())); |
| 77 | 77 | ||
| 78 | - // 4.1 校验今天是否签到,没有签到则直接返回 | ||
| 79 | - if (!summary.getTodaySignIn()) { | 78 | + // 4.1 检查今天是否未签到且记录不是昨天创建的,如果是则直接返回 |
| 79 | + if (!summary.getTodaySignIn() && !DateUtils.isYesterday(lastRecord.getCreateTime())) { | ||
| 80 | return summary; | 80 | return summary; |
| 81 | } | 81 | } |
| 82 | - // 4.2 连续签到天数 | 82 | + |
| 83 | + // 4.2 要么是今天签到了,要么是昨天的记录,设置连续签到天数 | ||
| 83 | summary.setContinuousDay(lastRecord.getDay()); | 84 | summary.setContinuousDay(lastRecord.getDay()); |
| 84 | return summary; | 85 | return summary; |
| 85 | } | 86 | } |