This commit is contained in:
moxiangrong
2024-02-22 18:12:41 +08:00
parent 8c015f02de
commit 8e918267ca
5 changed files with 21 additions and 4 deletions

View File

@ -204,9 +204,6 @@ public class SignInRecordServiceImpl implements SignInRecordService {
verifyExistSignInToday(userId);
//获取当前签到规则
IntegralRuleDO currentIntegralRule = getIntegralRule(userId);
if(!currentIntegralRule.getEnable()){
throw exception(SIGN_IN_CLOSED);
}
//领取积分
IntegralRuleDTO rule = new IntegralRuleDTO();
rule.setUserId(userId);
@ -234,7 +231,7 @@ public class SignInRecordServiceImpl implements SignInRecordService {
//查询签到相关积分规则
List<IntegralRuleDO> integralRuleList = integralRuleService.getIntegralRuleByTypes(ListUtil.of(BillDetailEnum.SIGN.getValue()));
//每日签到规则
IntegralRuleDO everydayIntegralRuleDO = integralRuleList.stream().filter(item -> item.getAttribute1().equals("1")).findFirst().orElse(new IntegralRuleDO(0,Boolean.FALSE));
IntegralRuleDO everydayIntegralRuleDO = integralRuleList.stream().filter(item -> item.getAttribute1().equals("1")).findFirst().orElse(new IntegralRuleDO(0,true));
//当前签到天数
Integer count = countByUserIdThisWeek(userId) + 1;
//获取当前签到规则