| | |
| | | |
| | | Integer count = userHeadDetailsMapper.selectDetailsCount(userId); |
| | | UserInfo userInfo = userMapper.selectByPrimaryKey(userId); |
| | | AccountInfo accountInfo = accountMapper.selectAccountInfoByUserId(userId); |
| | | List<String> remark = new ArrayList<>(); |
| | | BigDecimal totalReturnScore = BigDecimal.ZERO; |
| | | BigDecimal totalReturnCoin = BigDecimal.ZERO; |
| | |
| | | userHeadRelate.setScore(userHeadDetails.getScore().add(totalReturnScore)); |
| | | userHeadRelateMapper.updateByPrimaryKey(userHeadRelate); |
| | | |
| | | AccountInfo update = new AccountInfo(); |
| | | update.setAccountId(accountInfo.getAccountId()); |
| | | update.setMoney(new BigDecimal(accountInfo.getMoney()).add(totalReturnCoin).setScale(2, BigDecimal.ROUND_DOWN).toString()); |
| | | BigDecimal collectScore = StrUtil.isNotBlank(accountInfo.getCollectScore()) ? new BigDecimal(accountInfo.getCollectScore()) : BigDecimal.ZERO; |
| | | update.setCollectScore(collectScore.add(totalReturnScore).setScale(2, BigDecimal.ROUND_DOWN).toString()); |
| | | accountMapper.updateByPrimaryKey(update); |
| | | |
| | | SysMessage sysMessage = new SysMessage(); |
| | | sysMessage.setCreateTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | sysMessage.setCreateUserId(userHeadRelate.getHeadUserId()); |