| | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | |
| | | @Scheduled(cron = "0 0 1 * * ? ") |
| | | @Scheduled(cron = "0 0 2 * * ? ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void start() { |
| | | log.info("返利执行"); |
| | | List<DappMemberEntity> members = dappMemberDao.selectAllMemberForInCome(); |
| | | if (CollUtil.isEmpty(members)) { |
| | | return; |
| | |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), ethIncome, 3, null, null); |
| | | dappFundFlowDao.insert(fundFlow); |
| | | |
| | | DappAccountMoneyChangeEntity accountMoneyChange = new DappAccountMoneyChangeEntity(member.getId(), walletMine.getAvailableAmount(), ethIncome, walletMine.getAvailableAmount().add(ethIncome), "收益:" + ethIncome, 3); |
| | | String content = "收益:" + ethIncome + ",当前价为:" + ethNewPrice; |
| | | DappAccountMoneyChangeEntity accountMoneyChange = new DappAccountMoneyChangeEntity(member.getId(), walletMine.getAvailableAmount(), ethIncome, walletMine.getAvailableAmount().add(ethIncome), content, 3); |
| | | dappAccountMoneyChangeDao.insert(accountMoneyChange); |
| | | |
| | | walletMine.setAvailableAmount(walletMine.getAvailableAmount().add(ethIncome)); |