<?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>
|
|
|
<update id="updateBlockBalance">
|
update member_wallet_coin
|
set
|
available_balance = IFNULL(available_balance, 0) + #{availableBalance},
|
total_balance = IFNULL(total_balance, 0) + #{availableBalance}
|
where id=#{id}
|
</update>
|
|
<update id="reduceFrozenBalance">
|
update member_wallet_coin
|
set frozen_balance = frozen_balance - #{amount},
|
total_balance = total_balance - #{amount}
|
where id=#{id}
|
</update>
|
|
</mapper>
|