| | |
| | | sysMessage.setFlag("2"); |
| | | sysMessageMapper.insert(sysMessage); |
| | | |
| | | redisUtil.setex(key, times.toString(), 84400); |
| | | Date tomorrow = DateUtil.parse(DateUtil.tomorrow().toString("yyyy-MM-dd") + " 00:00:00", "yyyy-MM-dd HH:mm:ss"); |
| | | long time = DateUtil.between(new Date(), tomorrow, DateUnit.SECOND, false); |
| | | redisUtil.setex(key, times.toString(), (int) time); |
| | | } |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | List<UserShareInfo> hasInvite = userShareInfoMapper.selectByPhone(phone); |
| | | if (CollUtil.isNotEmpty(hasInvite)) { |
| | | if (hasInvite.size() >= 10) { |
| | | log.info("超过10个,邀请无效:{}", phone); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | BigDecimal returnScore = new BigDecimal(invite); |
| | | BigDecimal collectScore = StrUtil.isNotBlank(accountInfo.getCollectScore()) ? new BigDecimal(accountInfo.getCollectScore()) : BigDecimal.ZERO; |
| | | accountInfo.setCollectScore(collectScore.add(returnScore).setScale(0, RoundingMode.DOWN).toString()); |