| | |
| | | getAppUserVipDetail.setVipId(user.getVipId()); |
| | | R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); |
| | | TAppUserVipDetail data1 = appUserVipDetail.getData(); |
| | | String vipJson = data1.getVipJson(); |
| | | TVip vip = JSON.parseObject(vipJson, TVip.class); |
| | | |
| | | // 查询邀请用户获得积分配置 |
| | | TIntegralRule integralRule = integralRuleClient.getSet().getData(); |
| | | JSONObject jsonObject = JSONObject.parseObject(integralRule.getInviteUsersToEarnPoints()); |
| | | TInviteUser inviteUser = new TInviteUser(); |
| | | inviteUser.setAppUserId(beInvitedAppUserId); |
| | | inviteUser.setBeInvitedAppUserId(appUserId); |
| | | inviteUser.setCreateTime(LocalDateTime.now()); |
| | | if(Objects.nonNull(vip) && vip.getDoubleIntegration() == 1){ |
| | | inviteUser.setAward(jsonObject.getInteger("num1")*2); |
| | | if(Objects.nonNull(data1)){ |
| | | String vipJson = data1.getVipJson(); |
| | | TVip vip = JSON.parseObject(vipJson, TVip.class); |
| | | if(Objects.nonNull(vip) && vip.getDoubleIntegration() == 1){ |
| | | inviteUser.setAward(jsonObject.getInteger("num1")*2); |
| | | }else { |
| | | inviteUser.setAward(jsonObject.getInteger("num1")); |
| | | } |
| | | }else { |
| | | inviteUser.setAward(jsonObject.getInteger("num1")); |
| | | } |
| | | inviteUser.setAppUserId(beInvitedAppUserId); |
| | | inviteUser.setBeInvitedAppUserId(appUserId); |
| | | inviteUser.setCreateTime(LocalDateTime.now()); |
| | | this.save(inviteUser); |
| | | } |
| | | } |