ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/TInviteUserServiceImpl.java
@@ -55,21 +55,24 @@ 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(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); } } ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
@@ -151,12 +151,16 @@ getAppUserVipDetail.setVipId(appUser.getVipId()); R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); TAppUserVipDetail data1 = appUserVipDetail.getData(); if(Objects.nonNull(data1)){ String vipJson = data1.getVipJson(); TVip vip = JSON.parseObject(vipJson, TVip.class); if(Objects.nonNull(vip) && vip.getType() == 2){ siteInfoVO.setVipElectrovalence(vip.getDiscount().divide(new BigDecimal(10)).multiply(tAccountingStrategyDetail.getServiceCharge()).add(tAccountingStrategyDetail.getElectrovalence())); }else { siteInfoVO.setVipElectrovalence((tAccountingStrategyDetail.getServiceCharge().multiply(byId1.getDiscount()).add(tAccountingStrategyDetail.getElectrovalence())).setScale(4, BigDecimal.ROUND_HALF_UP)); } }else { siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().add(tAccountingStrategyDetail.getServiceCharge()).setScale(4, BigDecimal.ROUND_HALF_UP)); } }else { siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().add(tAccountingStrategyDetail.getServiceCharge()).setScale(4, BigDecimal.ROUND_HALF_UP)); @@ -199,6 +203,7 @@ getAppUserVipDetail.setVipId(appUser.getVipId()); R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); TAppUserVipDetail data1 = appUserVipDetail.getData(); if(Objects.nonNull(data1)){ String vipJson = data1.getVipJson(); TVip vip = JSON.parseObject(vipJson, TVip.class); if(Objects.nonNull(vip) && vip.getType() == 2){ @@ -209,6 +214,9 @@ }else { siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().add(tAccountingStrategyDetail.getServiceCharge()).setScale(4, BigDecimal.ROUND_HALF_UP)); } }else { siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().add(tAccountingStrategyDetail.getServiceCharge()).setScale(4, BigDecimal.ROUND_HALF_UP)); } } } List<TVip> vips = vipClient.getVipList().getData(); ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/SiteServiceImpl.java
@@ -308,6 +308,7 @@ getAppUserVipDetail.setVipId(appUser.getVipId()); R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); TAppUserVipDetail data1 = appUserVipDetail.getData(); if(Objects.nonNull(data1)){ String vipJson = data1.getVipJson(); TVip vip = JSON.parseObject(vipJson, TVip.class); if(Objects.nonNull(vip) && vip.getType() == 2){ @@ -316,6 +317,7 @@ item.setVipElectrovalence(vip.getDiscount().divide(new BigDecimal(10)).multiply(item.getServiceCharge()).add(item.getElectrovalenceOriginal())); } }); } } } pageInfo.setRecords(list); @@ -405,6 +407,7 @@ getAppUserVipDetail.setVipId(appUser.getVipId()); R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); TAppUserVipDetail data1 = appUserVipDetail.getData(); if(Objects.nonNull(data1)){ String vipJson = data1.getVipJson(); TVip vip = JSON.parseObject(vipJson, TVip.class); if(Objects.nonNull(vip) && vip.getType() == 2){ @@ -413,6 +416,7 @@ }); } } } return list; } ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java
@@ -86,8 +86,11 @@ getAppUserVipDetail.setVipId(appUser.getVipId()); R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); TAppUserVipDetail data1 = appUserVipDetail.getData(); TVip vip = null; if(Objects.nonNull(data1)){ String vipJson = data1.getVipJson(); TVip vip = JSON.parseObject(vipJson, TVip.class); vip = JSON.parseObject(vipJson, TVip.class); } TAccountingStrategyDetailVO accountingStrategyDetailVO; TAccountingStrategyDetailVO accountingStrategyDetailNext;