订单支付成功时,事务化写入 USDT 收入流水。

归集明细成功时,事务化写入 USDT 支出流水。
使用唯一幂等键防止订单重扫、归集重试产生重复流水。
新增按应用、币种、时间范围以及日/月/年维度的统计接口。
管理员和商户接口均改为只读,移除流水新增、修改、删除入口。
商户查询由后端强制限定当前用户。
This commit is contained in:
lu7213 committed 2026-10-13 10:32:18 -04:00
1 parent 8cc7bd0c17
commit 0ff174e872
15 files changed
+377 -254

No files matched your search

@@ -15,6 +15,13 @@ import com.ruoyi.system.domain.UsdtOrdersPlus;
*/
public interface UsdtOrdersMapper extends BaseMapper<UsdtOrdersPlus>
{
UsdtOrdersPlus selectByIdForUpdate(@Param("id") Long id);
int countPaidByTransactionId(@Param("transactionId") String transactionId,
@Param("excludeOrderId") Long excludeOrderId);
int markOrderPaid(@Param("id") Long id, @Param("transactionId") String transactionId,
@Param("updatedAt") java.util.Date updatedAt);
/**
* 查询订单
*
@@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.WalletAddressLedger;
import com.ruoyi.system.domain.WalletAddressLedgerPlus;
import com.ruoyi.system.domain.vo.WalletLedgerStatisticsQuery;
import com.ruoyi.system.domain.vo.WalletLedgerSummaryVo;
import com.ruoyi.system.domain.vo.WalletLedgerTrendVo;
/**
* 钱包地址资金流水Mapper接口
@@ -31,6 +34,13 @@ public interface WalletAddressLedgerMapper extends BaseMapper<WalletAddressLedge
*/
public List<WalletAddressLedger> selectWalletAddressLedgerList(WalletAddressLedger walletAddressLedger);
/** 由系统业务链路幂等写入流水,重复幂等键不产生新记录。 */
int insertSystemLedgerIgnoreDuplicate(WalletAddressLedger walletAddressLedger);
List<WalletLedgerSummaryVo> selectStatisticsSummary(WalletLedgerStatisticsQuery query);
List<WalletLedgerTrendVo> selectStatisticsTrend(WalletLedgerStatisticsQuery query);
/**
* 新增钱包地址资金流水
*