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

@@ -65,6 +65,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} and deleted_at is null
</select>
<select id="selectAppsByIdForUpdate" resultMap="AppsResult">
<include refid="selectAppsVo"/>
where id = #{id} and deleted_at is null for update
</select>
<update id="updateKeyPair">
update apps
set public_key = #{publicKey}, private_key = #{privateKey}, updated_at = #{updatedAt}
@@ -97,6 +97,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where deleted_at is null and app_id is null and user_id is null and wallet_user_name is null
and cast(token_index as unsigned) &gt; 0
</select>
<select id="selectFirstAvailableForUpdate" resultMap="WalletAddressResult">
<include refid="selectWalletAddressVo"/>
where deleted_at is null and status = 1 and app_id is null and user_id is null
and wallet_user_name is null
order by id asc limit 1 for update
</select>
<select id="selectByAppAndWalletUserName" resultMap="WalletAddressResult">
<include refid="selectWalletAddressVo"/>
where deleted_at is null and status = 1 and app_id = #{appId}
and wallet_user_name = #{walletUserName}
order by id asc limit 1
</select>
<update id="bindAvailableWallet">
update wallet_address
set app_id = #{appId}, user_id = #{userId}, wallet_user_name = #{walletUserName},
updated_at = #{updatedAt}
where id = #{id} and deleted_at is null and status = 1
and app_id is null and user_id is null and wallet_user_name is null
</update>
<insert id="insertWalletAddress" parameterType="WalletAddress" useGeneratedKeys="true" keyProperty="id">
insert into wallet_address