!984 修复会员签到记录bug

Merge pull request !984 from 随便v走走/hotfix/member-sign-in-record-bug
This commit is contained in:
芋道源码 2024-06-22 02:36:59 +00:00 committed by Gitee
commit fb459f0366
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 3 deletions

View File

@ -75,11 +75,12 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
}
summary.setTodaySignIn(DateUtils.isToday(lastRecord.getCreateTime()));
// 4.1 校验今天是否签到没有签到则直接返回
if (!summary.getTodaySignIn()) {
// 4.1 检查今天是否未签到且记录不是昨天创建的如果是则直接返回
if (!summary.getTodaySignIn() && !DateUtils.isYesterday(lastRecord.getCreateTime())) {
return summary;
}
// 4.2 连续签到天数
// 4.2 要么是今天签到了要么是昨天的记录设置连续签到天数
summary.setContinuousDay(lastRecord.getDay());
return summary;
}