From 6a9716c46ac41b509b25d038c3a97d53b8ff9e8e Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 19 Jan 2026 22:42:31 +0800 Subject: [PATCH] =?UTF-8?q?amount=20<=3D=200=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lottery/impl/LotteryBackpackGatewayImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/lottery/impl/LotteryBackpackGatewayImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/lottery/impl/LotteryBackpackGatewayImpl.java index 84441475..10e8ad09 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/lottery/impl/LotteryBackpackGatewayImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/lottery/impl/LotteryBackpackGatewayImpl.java @@ -27,6 +27,10 @@ public class LotteryBackpackGatewayImpl implements LotteryBackpackGateway { @Override public void recordTicketAdd(Long userId, Integer amount, String source, String bizNo) { + if (amount == null || amount <= 0) { + return; + } + LotteryBackpackLog log = buildLog(userId, "lottery_ticket", "水晶", "https://xxx.com/crystal.png", 1, amount, source, bizNo); logDatabaseService.save(log); @@ -34,6 +38,10 @@ public class LotteryBackpackGatewayImpl implements LotteryBackpackGateway { @Override public void recordTicketDeduct(Long userId, Integer amount, String source, String bizNo) { + if (amount == null || amount <= 0) { + return; + } + LotteryBackpackLog log = buildLog(userId, "lottery_ticket", "水晶", "https://xxx.com/crystal.png", 2, amount, source, bizNo); logDatabaseService.save(log); @@ -41,6 +49,10 @@ public class LotteryBackpackGatewayImpl implements LotteryBackpackGateway { @Override public void recordFragmentAdd(Long userId, Integer amount, String source, String bizNo) { + if (amount == null || amount <= 0) { + return; + } + LotteryBackpackLog log = buildLog(userId, "cp_fragment", "碎片", "https://xxx.com/fragment.png", 1, amount, source, bizNo); logDatabaseService.save(log); @@ -48,6 +60,10 @@ public class LotteryBackpackGatewayImpl implements LotteryBackpackGateway { @Override public void recordFragmentDeduct(Long userId, Integer amount, String source, String bizNo) { + if (amount == null || amount <= 0) { + return; + } + LotteryBackpackLog log = buildLog(userId, "cp_fragment", "碎片", "https://xxx.com/fragment.png", 2, amount, source, bizNo); logDatabaseService.save(log);