From e216849921166a1555a612eb94e86d5793455117 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 22 Jun 2024 10:38:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91MEMBER?= =?UTF-8?q?=EF=BC=9A=E4=BC=9A=E5=91=98=E7=AD=BE=E5=88=B0=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=20Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/signin/MemberSignInRecordServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java index cdf32105a..d7c3b8e9f 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java +++ b/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 } 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; }