api开放钱包创建接口

This commit is contained in:
lu7213 committed 2026-10-10 08:46:53 -04:00
1 parent 658e6ccf1e
commit a2be79377b
26 files changed
+636 -4

No files matched your search

@@ -21,6 +21,9 @@ public interface AppsMapper extends BaseMapper<AppsPlus>
/** 查询用户当前未删除的应用数量。 */
int countActiveAppsByUserId(@Param("userId") Long userId);
/** 锁定应用,串行化同一应用的钱包领取。 */
Apps selectAppsByIdForUpdate(@Param("id") Long id);
int updateKeyPair(@Param("id") Long id, @Param("publicKey") String publicKey,
@Param("privateKey") String privateKey, @Param("updatedAt") java.util.Date updatedAt);
@@ -45,6 +45,18 @@ public interface WalletAddressMapper extends BaseMapper<WalletAddressPlus>
/** 统计未分配给应用和用户的全局子账号。 */
int countGlobalChildAccounts();
/** 锁定 ID 最小的未分配钱包,避免并发请求重复领取。 */
WalletAddress selectFirstAvailableForUpdate();
/** 查询应用外部用户已绑定的钱包,用于接口重试幂等。 */
WalletAddress selectByAppAndWalletUserName(@Param("appId") Long appId,
@Param("walletUserName") String walletUserName);
/** 仅当钱包仍为空闲状态时绑定归属。 */
int bindAvailableWallet(@Param("id") Long id, @Param("appId") Long appId,
@Param("userId") Long userId, @Param("walletUserName") String walletUserName,
@Param("updatedAt") java.util.Date updatedAt);
/**
* 修改钱包
*