From 93a779f24011180bc523a103a696f1c681a5fcbc Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 15 Jan 2026 18:25:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=85=83=E9=98=B2=E6=AD=A2=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E8=B6=85=E9=A2=9D=E8=BF=87=E6=BB=A4=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/command/activity/LotteryDrawExe.java | 20 +++++++++---------- .../command/activity/LotteryMultiDrawExe.java | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) 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)