From 951c94ad11acdfdd8d174fe0840a9c11d55f4cc7 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Thu, 13 Feb 2025 12:32:19 +0800 Subject: [PATCH] feat(runVip): 添加线上充值字段并更新相关页面和数据映射 --- src/main/java/cc/mrbird/febs/mall/service/impl/AsyncServiceImpl.java | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AsyncServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AsyncServiceImpl.java index d661692..9063f79 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/AsyncServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AsyncServiceImpl.java @@ -43,26 +43,22 @@ } @Override - public void releaseNodeCoin(BigDecimal amount, BigDecimal percent, BigDecimal balanceToCoin,Long memberId) { - //实际节点返利的金额 - BigDecimal multiply = amount.multiply(percent); + public void releaseNodeCoin(BigDecimal amount, BigDecimal percent, Long memberId) { + //实际节点助力的碳币 + BigDecimal multiply = amount.multiply(percent).setScale(2,RoundingMode.DOWN); if(BigDecimal.ZERO.compareTo(multiply) >=0){ return; } - BigDecimal divide = multiply.divide(balanceToCoin, 2, RoundingMode.DOWN); - if(BigDecimal.ZERO.compareTo(divide) >=0){ - return; - } - walletService.addBalance(divide,memberId); + walletService.addCommission(multiply,memberId); String orderNo = MallUtils.getOrderNum("JD"); mallMoneyFlowService.runVipMoneyFlowAdd( memberId, memberId, orderNo, - FlowTypeEnum.BALANCE.getValue(), - RunVipMoneyFlowTypeEnum.NODE_BALANCE.getValue(), - divide, - StrUtil.format(RunVipMoneyFlowTypeEnum.NODE_BALANCE.getDescription(),divide), + FlowTypeEnum.COMMISSION.getValue(), + RunVipMoneyFlowTypeEnum.NODE_COMMISSION.getValue(), + multiply, + StrUtil.format(RunVipMoneyFlowTypeEnum.NODE_COMMISSION.getDescription(),multiply), YesOrNoEnum.YES.getValue() ); -- Gitblit v1.9.1