| | |
| | | } |
| | | Integer lavePoint = appUser.getLavePoint(); |
| | | appUser.setTotalPoint(appUser.getTotalPoint() + signPoint); |
| | | appUser.setTotalSignPoint(appUser.getTotalSignPoint() + signPoint); |
| | | appUser.setLavePoint(appUser.getLavePoint() + signPoint); |
| | | appUser.setAvailablePoint(appUser.getAvailablePoint() + signPoint1); |
| | | appUser.setTotalAvailablePoint(appUser.getTotalAvailablePoint() + signPoint1); |
| | |
| | | appUserService.updateById(appUser); |
| | | |
| | | //添加积分变动记录 |
| | | UserPoint userPoint = new UserPoint(); |
| | | userPoint.setType(5); |
| | | userPoint.setHistoricalPoint(lavePoint); |
| | | userPoint.setVariablePoint(signPoint); |
| | | userPoint.setBalance(appUser.getLavePoint()); |
| | | userPoint.setCreateTime(LocalDateTime.now()); |
| | | userPoint.setAppUserId(appUser.getId()); |
| | | userPointService.save(userPoint); |
| | | if(signPoint > 0){ |
| | | UserPoint userPoint = new UserPoint(); |
| | | userPoint.setType(5); |
| | | userPoint.setHistoricalPoint(lavePoint); |
| | | userPoint.setVariablePoint(signPoint); |
| | | userPoint.setBalance(appUser.getLavePoint()); |
| | | userPoint.setCreateTime(LocalDateTime.now()); |
| | | userPoint.setAppUserId(appUser.getId()); |
| | | userPointService.save(userPoint); |
| | | } |
| | | //变更等级 |
| | | appUserService.vipUpgrade(appUser.getId()); |
| | | } |