| | |
| | | for (UserPointDetailVO userPointDetailVO : userPointDetail) { |
| | | Integer type1 = userPointDetailVO.getType(); |
| | | if (type1 != null && type1.equals(12)){ |
| | | AppUser appUser = appUserService.getById(userPointDetailVO.getReceiveUserId()); |
| | | //他人赠送 |
| | | AppUser appUser = appUserService.getById(userPointDetailVO.getObjectId()); |
| | | userPointDetailVO.setName(appUser.getName()); |
| | | userPointDetailVO.setTransferUserId(appUser.getId()); |
| | | } |
| | | if (type1 != null && type1.equals(13)){ |
| | | AppUser appUser = appUserService.getById(userPointDetailVO.getTransferUserId()); |
| | | //赠予他人 |
| | | AppUser appUser = appUserService.getById(userPointDetailVO.getObjectId()); |
| | | userPointDetailVO.setName(appUser.getName()); |
| | | userPointDetailVO.setReceiveUserId(appUser.getId()); |
| | | } |
| | | Integer historicalPoint = userPointDetailVO.getHistoricalPoint(); |
| | | Integer balance = userPointDetailVO.getBalance(); |
| | |
| | | Integer balance = historicalPoint +point;//变动后积分 |
| | | |
| | | appUserForPhoe.setAvailablePoint(balance);//可用积分增加 |
| | | appUserForPhoe.setTotalPoint(appUserForPhoe.getUserTotalPoint() + point);//总积分增加 |
| | | appUserForPhoe.setTotalPoint(appUserForPhoe.getTotalPoint() + point);//总积分增加 |
| | | appUserForPhoe.setTransferableInPoint(appUserForPhoe.getTransferableInPoint() + point);//转入积分增加 |
| | | |
| | | appUserService.updateById(appUserForPhoe); |
| | |
| | | userPointService.save(userPoint); |
| | | } |
| | | |
| | | Integer historicalPoint2 = appUserForPhoe.getAvailablePoint();//历史积分 |
| | | Integer balance2 = historicalPoint - point;//变动后积分 |
| | | Integer historicalPoint2 = appUser.getAvailablePoint();//历史积分 |
| | | Integer balance2 = historicalPoint2 - point;//变动后积分 |
| | | |
| | | appUser.setAvailablePoint(balance);//可用积分减少 |
| | | appUser.setTransferableOutPoint(appUserForPhoe.getTransferableOutPoint() + point);//转出积分增加 |
| | | appUser.setAvailablePoint(balance2);//可用积分减少 |
| | | appUser.setTotalPoint(appUser.getTotalPoint() + point);//总积分增加 |
| | | appUser.setTransferableOutPoint(appUser.getTransferableOutPoint() + point);//转出积分增加 |
| | | |
| | | appUserService.updateById(appUser); |
| | | //构建积分流水记录 |