| | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | continue; |
| | | } |
| | | for (MallMember item : directMembers) { |
| | | BigDecimal realScore = calculateDirectScore(memberRunVip, item, operationDate, runVipMap); |
| | | if(BigDecimal.ZERO.compareTo(realScore) >= 0){ |
| | | continue; |
| | | } |
| | | walletService.addScore(realScore, memberId); |
| | | String orderNo = MallUtils.getOrderNum("ZLS"); |
| | | mallMoneyFlowService.runVipMoneyFlowAdd( |
| | | memberId, |
| | | item.getId(), |
| | | orderNo, |
| | | FlowTypeEnum.SCORE.getValue(), |
| | | RunVipMoneyFlowTypeEnum.DIRECT_SCORE.getValue(), |
| | | realScore, |
| | | StrUtil.format(RunVipMoneyFlowTypeEnum.DIRECT_SCORE.getDescription(), realScore), |
| | | YesOrNoEnum.YES.getValue() |
| | | ); |
| | | CompletableFuture.runAsync(() -> { |
| | | BigDecimal realScore = calculateDirectScore(memberRunVip, item, operationDate, runVipMap); |
| | | if(BigDecimal.ZERO.compareTo(realScore) >= 0){ |
| | | return; |
| | | } |
| | | walletService.addScore(realScore, memberId); |
| | | String orderNo = MallUtils.getOrderNum("ZLS"); |
| | | mallMoneyFlowService.runVipMoneyFlowAdd( |
| | | memberId, |
| | | item.getId(), |
| | | orderNo, |
| | | FlowTypeEnum.SCORE.getValue(), |
| | | RunVipMoneyFlowTypeEnum.DIRECT_SCORE.getValue(), |
| | | realScore, |
| | | StrUtil.format(RunVipMoneyFlowTypeEnum.DIRECT_SCORE.getDescription(), realScore), |
| | | YesOrNoEnum.YES.getValue() |
| | | ); |
| | | }); |
| | | } |
| | | } |
| | | } catch (Exception e) { |