diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryDrawExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryDrawExe.java index 7da20ed0..4c7592af 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryDrawExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryDrawExe.java @@ -140,7 +140,7 @@ public class LotteryDrawExe { private void deductUserGold(Long userId, LotteryActivity activity) { GoldReceiptCmd build = GoldReceiptCmd.builder() - .appIncome() + .appExpenditure() .userId(userId) .amount(PennyAmount.ofDollar(activity.getCoinCost().longValue())) .eventId(activity.getId()) @@ -410,15 +410,15 @@ public class LotteryDrawExe { } // 特殊情况:前期(<50次)已经拿到>=5美元,进入"慢速模式" - if (currentAmount.compareTo(new BigDecimal("5.0")) >= 0 && drawCount < 50) { - log.info("User got big prize early, entering slow mode. userId: {}, amount: {}, count: {}", - progress.getUserId(), currentAmount, drawCount); - - // 只允许0.1美元和虚拟物品(prize_value<=0.15) - return prizes.stream() - .filter(prize -> prize.getPrizeValue().compareTo(new BigDecimal("0.15")) <= 0) - .collect(Collectors.toList()); - } +// if (currentAmount.compareTo(new BigDecimal("5.0")) >= 0 && drawCount < 50) { +// log.info("User got big prize early, entering slow mode. userId: {}, amount: {}, count: {}", +// progress.getUserId(), currentAmount, drawCount); +// +// // 只允许0.1美元和虚拟物品(prize_value<=0.15) +// return prizes.stream() +// .filter(prize -> prize.getPrizeValue().compareTo(new BigDecimal("0.15")) <= 0) +// .collect(Collectors.toList()); +// } // 正常防超额过滤 return prizes.stream() diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryMultiDrawExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryMultiDrawExe.java index aca560ae..6b15498d 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryMultiDrawExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryMultiDrawExe.java @@ -352,9 +352,9 @@ public class LotteryMultiDrawExe { if (currentAmount.compareTo(threshold) >= 0) { return prizes.stream().filter(prize -> prize.getPrizeValue().compareTo(BigDecimal.ZERO) == 0).collect(Collectors.toList()); } - if (currentAmount.compareTo(new BigDecimal("5.0")) >= 0 && drawCount < 50) { - return prizes.stream().filter(prize -> prize.getPrizeValue().compareTo(new BigDecimal("0.15")) <= 0).collect(Collectors.toList()); - } +// if (currentAmount.compareTo(new BigDecimal("5.0")) >= 0 && drawCount < 50) { +// return prizes.stream().filter(prize -> prize.getPrizeValue().compareTo(new BigDecimal("0.15")) <= 0).collect(Collectors.toList()); +// } return prizes.stream().filter(prize -> { BigDecimal afterAmount = currentAmount.add(prize.getPrizeValue()); return afterAmount.compareTo(threshold) <= 0; @@ -520,7 +520,7 @@ public class LotteryMultiDrawExe { private void deductUserGold(Long userId, Long activityId, Integer amount) { GoldReceiptCmd build = GoldReceiptCmd.builder() - .appIncome() + .appExpenditure() .userId(userId) .amount(PennyAmount.ofDollar(amount.longValue())) .eventId(activityId)