| | |
| | | continue; |
| | | } |
| | | |
| | | if (direct.compareTo(BigDecimal.ONE) < 1) { |
| | | break; |
| | | } |
| | | |
| | | int reduce = walletService.reduce(direct, parentMember.getId(), "score"); |
| | | if (reduce == 2) { |
| | | continue; |
| | | } |
| | | |
| | | walletService.add(direct, parentMember.getId(), "commission"); |
| | | |
| | | moneyFlowService.addMoneyFlow(parentMember.getId(), direct, MoneyFlowTypeEnum.RECOMMEND_BONUS.getValue(), orderInfo.getOrderNo(), FlowTypeEnum.COMMISSION.getValue()); |
| | | moneyFlowService.addMoneyFlow(parentMember.getId(), direct.negate(), MoneyFlowTypeEnum.RECOMMEND_BONUS.getValue(), orderInfo.getOrderNo(), FlowTypeEnum.SCORE.getValue()); |
| | | |
| | | if (direct.compareTo(BigDecimal.ONE) < 1) { |
| | | break; |
| | | } |
| | | direct = direct.divide(indrectDicProp, 2, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | if (dynamicProfit.compareTo(BigDecimal.ZERO) < 1) { |
| | | continue; |
| | | } |
| | | |
| | | int reduce = walletService.reduce(dynamicProfit, member.getId(), "score"); |
| | | if (reduce == 2) { |
| | | continue; |