From 3bdaa080e3ed42217470092ba1359acd4975133d Mon Sep 17 00:00:00 2001 From: luqingjie <544309509@qq.com> Date: Wed, 14 Oct 2026 03:40:48 -0400 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/service/WalletLedgerPostingService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/WalletLedgerPostingService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/WalletLedgerPostingService.java index fa3bdb1..e4d7b2e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/WalletLedgerPostingService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/WalletLedgerPostingService.java @@ -14,6 +14,7 @@ import com.ruoyi.system.mapper.AppsBalanceLedgerMapper; import com.ruoyi.system.mapper.AppsMapper; import com.ruoyi.system.mapper.UsdtConfigMapper; import com.ruoyi.system.mapper.WalletAddressLedgerMapper; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionSynchronization; @@ -26,6 +27,7 @@ import java.math.BigDecimal; * 系统业务流水入账服务。 * 链上广播必须在调用本服务前完成,本服务只负责数据库状态与流水的原子落库。 */ +@Slf4j @Service public class WalletLedgerPostingService { private static final long STATUS_PENDING = 1L; @@ -66,12 +68,15 @@ public class WalletLedgerPostingService { throw new CustomException("订单不存在"); } if (Long.valueOf(STATUS_PAID).equals(order.getStatus())) { + log.warn("订单已经支付 {}",orderId); return transactionId.equals(order.getBlockTransactionId()); } if (!Long.valueOf(STATUS_PENDING).equals(order.getStatus())) { + log.warn("订单状态不正确 {}",orderId); return false; } if (ordersMapper.countPaidByTransactionId(transactionId, orderId) > 0) { + log.warn("订单transactionId已经存在 {}",orderId); return false; }