| | |
| | | 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) { |
| | | CompletableFuture.runAsync(() -> { |
| | | BigDecimal realScore = calculateDirectScore(memberRunVip, item, operationDate, runVipMap); |
| | | if(BigDecimal.ZERO.compareTo(realScore) >= 0){ |
| | | return; |
| | |
| | | StrUtil.format(RunVipMoneyFlowTypeEnum.DIRECT_SCORE.getDescription(), realScore), |
| | | YesOrNoEnum.YES.getValue() |
| | | ); |
| | | },febsConfigure.asyncThreadPoolTaskExecutor()); |
| | | // 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() |
| | | // ); |
| | | // },febsConfigure.asyncThreadPoolTaskExecutor()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |