<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberWalletCoinMapper">
|
|
|
<select id="findWalletCoinByMemberIdAndWalletCode" resultType="com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity">
|
select * from member_wallet_coin where member_id = #{memberId} and wallet_code = #{walletCode}
|
</select>
|
|
<select id="selectTdCoinWalletByAddress" resultType="com.xcong.excoin.modules.member.entity.TdCoinWallet">
|
select * from td_coin_wallet
|
where address=#{address} and symbol=#{symbol}
|
</select>
|
|
<update id="updateTdCoinWalletAvaliable">
|
update td_coin_wallet
|
set available_balance=available_balance+#{money}
|
where address=#{address}
|
</update>
|
|
<update id="updateTdCoinWalletTrc20">
|
update td_coin_wallet
|
set available_balance=available_balance+#{money}
|
where mem_id=#{memberId} and symbol ='USDT'
|
</update>
|
|
<select id="selectMemberWalletCoinByMemberId" resultType="java.util.HashMap">
|
select
|
member_id,
|
MAX(case wallet_code when 'USDT' then available_balance else 0 end) usdt,
|
MAX(case wallet_code when 'RFNC' then available_balance else 0 end) rfnc
|
from member_wallet_coin
|
where member_id=#{memberId}
|
</select>
|
</mapper>
|