| | |
| | | byId.setLavePoint(byId.getLavePoint() - point); |
| | | appUserService.updateById(byId); |
| | | |
| | | UserPoint userPoint = new UserPoint(); |
| | | userPoint.setType(15); |
| | | userPoint.setHistoricalPoint(lavePoint); |
| | | userPoint.setVariablePoint(point); |
| | | userPoint.setBalance(byId.getLavePoint()); |
| | | userPoint.setAppUserId(userid); |
| | | userPoint.setObjectId(Long.valueOf(data.getId())); |
| | | userPoint.setCreateTime(LocalDateTime.now()); |
| | | userPointService.save(userPoint); |
| | | if(point > 0){ |
| | | UserPoint userPoint = new UserPoint(); |
| | | userPoint.setType(15); |
| | | userPoint.setHistoricalPoint(lavePoint); |
| | | userPoint.setVariablePoint(point); |
| | | userPoint.setBalance(byId.getLavePoint()); |
| | | userPoint.setAppUserId(userid); |
| | | userPoint.setObjectId(Long.valueOf(data.getId())); |
| | | userPoint.setCreateTime(LocalDateTime.now()); |
| | | userPointService.save(userPoint); |
| | | } |
| | | } |
| | | //增加优惠券记录,根据时间类型设置开始结束时间 |
| | | UserCoupon userCoupon = new UserCoupon(); |