Commit 59c53011 authored by shiyu's avatar shiyu

查询签到记录

parent f18d238e
...@@ -189,11 +189,14 @@ public class UserSigninServiceImpl implements UserSigninService { ...@@ -189,11 +189,14 @@ public class UserSigninServiceImpl implements UserSigninService {
//检查昨天是否打过卡 //检查昨天是否打过卡
UserSignIn yesterdaySignIn = userSignInDao.findYesterdayRecord(userId); UserSignIn yesterdaySignIn = userSignInDao.findYesterdayRecord(userId);
if (yesterdaySignIn == null) { if (yesterdaySignIn == null && todayRecord == null) {
//连续签到天数 //连续签到天数
resultMap.put("consecutiveDays", 0); resultMap.put("consecutiveDays", 0);
//还需签到的天数 //还需签到的天数
resultMap.put("needConsecutiveDays", 7); resultMap.put("needConsecutiveDays", 7);
} else if (yesterdaySignIn == null && todayRecord != null) {
resultMap.put("consecutiveDays", todayRecord.getConsecutiveDays());
resultMap.put("needConsecutiveDays", 6);
} else { } else {
if (todayRecord != null) { if (todayRecord != null) {
resultMap.put("consecutiveDays", todayRecord.getConsecutiveDays()); resultMap.put("consecutiveDays", todayRecord.getConsecutiveDays());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment