From d960fdbfe07a65cb80ccb764bfb15ce78ebfd84a Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 10 四月 2020 18:21:04 +0800 Subject: [PATCH] 消息修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java index 3b2750c..458b097 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java @@ -19,6 +19,16 @@ @Resource private HongBaoManageService hongBaoManageService; + @Override + public BigDecimal computeBaseFanliMoney(CommonOrder order) { + return getBaseCommission(order); + } + + @Override + public BigDecimal computeBaseShareMoney(CommonOrder order) { + return getBaseCommission(order); + } + // 鑾峰彇鍩虹浣i噾 private BigDecimal getBaseCommission(CommonOrder order) { BigDecimal rate = hongBaoManageService.getBaseFanliRate(order.getThirdCreateTime().getTime()); @@ -93,7 +103,7 @@ 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))); } @@ -105,7 +115,7 @@ 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))); } @@ -160,10 +170,11 @@ * BigDecimal 杩斿洖绫诲瀷 * @throws */ - private BigDecimal getTeamSubsidyRate(Date date, UserLevelEnum buyerUserLevel, UserLevelEnum userLevel, - boolean first) { + @Override + public BigDecimal getTeamSubsidyRate(Date date, UserLevelEnum buyerUserLevel, UserLevelEnum userLevel, + boolean direct) { String key = null; - if (first) + if (direct) key = String.format("team_subsidy_6_pre_%s_%s", buyerUserLevel.getLevel(), userLevel.getLevel()); else key = String.format("team_subsidy_7_pre_%s_%s", buyerUserLevel.getLevel(), userLevel.getLevel()); -- Gitblit v1.8.0