| | |
| | | if (rate == null)
|
| | | return null;
|
| | | BigDecimal baseRate = hongBaoManageService.getBaseFanliRate(placeOrderTime.getTime());
|
| | | BigDecimal officialSubsidyRate = getOfficialSubsidyRate(placeOrderTime, userLevel, false);
|
| | | BigDecimal officialSubsidyRate = getOfficialSubsidyRate(placeOrderTime, buyerUserLevel, false);
|
| | | return MoneyBigDecimalUtil.div(fanLiMoney.multiply(baseRate).multiply(rate),
|
| | | baseRate.add(officialSubsidyRate).multiply(new BigDecimal(100)));
|
| | | }
|
| | |
| | | if (rate == null)
|
| | | return null;
|
| | | BigDecimal baseRate = hongBaoManageService.getBaseFanliRate(placeOrderTime.getTime());
|
| | | BigDecimal officialSubsidyRate = getOfficialSubsidyRate(placeOrderTime, userLevel, false);
|
| | | BigDecimal officialSubsidyRate = getOfficialSubsidyRate(placeOrderTime, buyerUserLevel, false);
|
| | | return MoneyBigDecimalUtil.div(fanLiMoney.multiply(baseRate).multiply(rate),
|
| | | baseRate.add(officialSubsidyRate).multiply(new BigDecimal(100)));
|
| | | }
|
| | |
|
| | | public BigDecimal computeFirstTeamReward(BigDecimal firstTeamSubsidy, Date placeOrderTime,
|
| | | BigDecimal secondTeamSubsidy, UserLevelEnum userLevel) {
|
| | | @Override
|
| | | public BigDecimal computeFirstTeamReward(BigDecimal money, Date placeOrderTime, UserLevelEnum userLevel) {
|
| | |
|
| | | if (userLevel != UserLevelEnum.superVIP)
|
| | | return null;
|
| | |
|
| | | BigDecimal firstRate = getTeamRewardRate(placeOrderTime, userLevel, true);
|
| | | BigDecimal secondRate = getTeamRewardRate(placeOrderTime, userLevel, false);
|
| | |
|
| | | if (firstRate == null || secondRate == null)
|
| | | if (firstRate == null)
|
| | | return null;
|
| | |
|
| | | BigDecimal firstReward = MoneyBigDecimalUtil.div(MoneyBigDecimalUtil.mul(secondRate, firstTeamSubsidy),
|
| | | new BigDecimal(100));
|
| | | BigDecimal secondReward = MoneyBigDecimalUtil.div(MoneyBigDecimalUtil.mul(firstRate, secondTeamSubsidy),
|
| | | new BigDecimal(100));
|
| | | BigDecimal reward = MoneyBigDecimalUtil.div(MoneyBigDecimalUtil.mul(firstRate, money), new BigDecimal(100));
|
| | |
|
| | | return firstReward.add(secondReward);
|
| | | return reward;
|
| | | }
|
| | |
|
| | | /**
|