fix
Helius
2022-06-17 38a7fc9d1a7a421741ef641303ac8d2a78d997f5
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallActServiceImpl.java
@@ -549,11 +549,18 @@
//        wallet.setCommission(commission);
//        mallMemberWalletMapper.updateAmountWithVersion(wallet);
        // 消耗积分
        BigDecimal useScore = new BigDecimal(actScoreCnt);
        mallMemberWalletService.reduce(useScore, wallet.getMemberId(), "prizeScore");
        mallMemberWalletService.add(commission, wallet.getMemberId(), "commission");
        mallMoneyFlowService.addMoneyFlow(wallet.getMemberId(), useScore.negate(), MoneyFlowTypeEnum.PRIZE.getValue(), null, FlowTypeEnum.PRIZE_SCORE.getValue());
        mallMoneyFlowService.addMoneyFlow(wallet.getMemberId(), commission, MoneyFlowTypeEnum.PRIZE.getValue(), null, FlowTypeEnum.COMMISSION.getValue());
        if (apiMallAwardDetailsVo.getAwardType() == 1) {
            mallMemberWalletService.add(new BigDecimal(apiMallAwardDetailsVo.getAwardValue()), wallet.getMemberId(), "prizeScore");
            mallMoneyFlowService.addMoneyFlow(wallet.getMemberId(), commission, MoneyFlowTypeEnum.PRIZE.getValue(), null, FlowTypeEnum.PRIZE_SCORE.getValue());
        } else if (apiMallAwardDetailsVo.getAwardType() == 2) {
            mallMemberWalletService.add(new BigDecimal(apiMallAwardDetailsVo.getAwardValue()), wallet.getMemberId(), "commission");
            mallMoneyFlowService.addMoneyFlow(wallet.getMemberId(), commission, MoneyFlowTypeEnum.PRIZE.getValue(), null, FlowTypeEnum.COMMISSION.getValue());
        }
        return apiMallAwardDetailsVo;
    }