| | |
| | | |
| | | @Resource |
| | | private VipSettingClient vipSettingClient; |
| | | |
| | | @Resource |
| | | private PointSettingClient pointSettingClient; |
| | | |
| | | @Resource |
| | | private UserChangeLogService userChangeLogService; |
| | | |
| | | |
| | | @Value("${file.upload.location}") |
| | | private String filePath; |
| | | |
| | | @Value("${file.upload.accessPath}") |
| | | private String accessPath; |
| | | |
| | | @Resource |
| | | private PointSettingClient pointSettingClient; |
| | | |
| | | |
| | | @Resource |
| | | private UserPointService userPointService; |
| | | |
| | |
| | | appUser.setTotalRedPacketAmount(BigDecimal.ZERO); |
| | | appUser.setTotalDistributionAmount(BigDecimal.ZERO); |
| | | appUser.setBalance(BigDecimal.ZERO); |
| | | appUser.setLavePoint(0); |
| | | R<PointSetting> pointSettingR = pointSettingClient.getPointSetting(1); |
| | | if (R.isError(pointSettingR)){ |
| | | throw new RuntimeException("获取积分设置失败"); |
| | | } |
| | | PointSetting pointSetting = pointSettingR.getData(); |
| | | if (pointSetting == null){ |
| | | throw new RuntimeException("积分设置不存在"); |
| | | } |
| | | appUser.setLavePoint(pointSetting.getGetRegisPoint()); |
| | | appUser.setTotalPoint(0); |
| | | //根据平台的配置未达标,则标注为可修改推广人 |
| | | appUser.setChangePromoter(0); |
| | |
| | | PointSetting pointSetting = pointSettingClient.getPointSetting(appUser.getVipId()).getData(); |
| | | if(null != pointSetting){ |
| | | int hourPoint = pointSetting.getHourPoint().intValue(); |
| | | int hourPoint1 = hourPoint; |
| | | if(1 == pointSetting.getWorkPointOpen()){ |
| | | hourPoint1 = hourPoint1 * (100 - pointSetting.getWorkPoint()); |
| | | } |
| | | Integer lavePoint = appUser.getLavePoint(); |
| | | appUser.setTotalPoint(appUser.getTotalPoint() + hourPoint); |
| | | appUser.setLavePoint(appUser.getLavePoint() + hourPoint); |
| | | appUser.setLavePoint(appUser.getLavePoint() + hourPoint1); |
| | | this.updateById(appUser); |
| | | //添加积分变动记录 |
| | | UserPoint userPoint = new UserPoint(); |