|
@@ -230,14 +230,24 @@ public class BackPolicyUtil {
|
|
if (CollectionUtils.isEmpty(splitStrategyList)) {
|
|
if (CollectionUtils.isEmpty(splitStrategyList)) {
|
|
return Tuple3.with(false, backMoney, null);
|
|
return Tuple3.with(false, backMoney, null);
|
|
}
|
|
}
|
|
|
|
+ GameBackPolicyVO.SplitStrategy backSplitStrategy = null;
|
|
|
|
+ for (GameBackPolicyVO.SplitStrategy splitStrategy : splitStrategyList) {
|
|
|
|
+ if (NumberUtil.multiply100(splitStrategy.getPayMoney()).longValue() == backMoney) {
|
|
|
|
+ backSplitStrategy = splitStrategy;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (backSplitStrategy == null) {
|
|
|
|
+ return Tuple3.with(false, backMoney, null);
|
|
|
|
+ }
|
|
List<Tuple2<Long, LocalDateTime>> result = new ArrayList<>();
|
|
List<Tuple2<Long, LocalDateTime>> result = new ArrayList<>();
|
|
LocalDateTime beginTime = LocalDateTime.now();
|
|
LocalDateTime beginTime = LocalDateTime.now();
|
|
- Long sumMoney = 0L;
|
|
|
|
- for (GameBackPolicyVO.SplitStrategy splitStrategy : splitStrategyList) {
|
|
|
|
- long money = NumberUtil.multiply100(splitStrategy.getPayMoney()).longValue();
|
|
|
|
|
|
+ long sumMoney = 0L;
|
|
|
|
+ for (BigDecimal splitMoney : backSplitStrategy.getSplitList()) {
|
|
|
|
+ long money = NumberUtil.multiply100(splitMoney).longValue();
|
|
sumMoney += money;
|
|
sumMoney += money;
|
|
result.add(Tuple2.with(money, beginTime));
|
|
result.add(Tuple2.with(money, beginTime));
|
|
- int randomMinute = RandomUtils.nextInt(splitStrategy.getBetweenMinuteMin(), splitStrategy.getBetweenMinuteMax());
|
|
|
|
|
|
+ int randomMinute = RandomUtils.nextInt(backSplitStrategy.getBetweenMinuteMin(), backSplitStrategy.getBetweenMinuteMax());
|
|
beginTime = beginTime.minusMinutes(randomMinute);
|
|
beginTime = beginTime.minusMinutes(randomMinute);
|
|
}
|
|
}
|
|
return Tuple3.with(true, sumMoney, result);
|
|
return Tuple3.with(true, sumMoney, result);
|