From 19a8cf376dc92c059a20845eaa82d365db56c23e Mon Sep 17 00:00:00 2001
From: gao <gaoleox@163>
Date: Wed, 27 May 2020 15:33:54 +0800
Subject: [PATCH] 快捷买入接口
---
src/main/resources/mapper/member/MemberWalletCoinDao.xml | 31 +++++++++++++++++++++++++------
1 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/src/main/resources/mapper/member/MemberWalletCoinDao.xml b/src/main/resources/mapper/member/MemberWalletCoinDao.xml
index 9bd74b7..9d67869 100644
--- a/src/main/resources/mapper/member/MemberWalletCoinDao.xml
+++ b/src/main/resources/mapper/member/MemberWalletCoinDao.xml
@@ -1,7 +1,26 @@
-<?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.dao.MemberWalletCoinDao">
-
-
-
+<?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.dao.MemberWalletCoinDao">
+
+ <select id="selectMemberWalletCoinsByMemberId" resultType="com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity">
+ select * from member_wallet_coin where member_id = #{memberId}
+ </select>
+
+ <select id="selectWalletCoinBymIdAndCode" resultType="com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity">
+ select * from member_wallet_coin where member_id = #{memberId} and wallet_code = #{walletCode}
+ </select>
+
+ <update id="updateFrozenBalance" parameterType="map">
+ UPDATE member_wallet_coin
+ SET available_balance = available_balance - #{amount},
+ frozen_balance = frozen_balance + #{amount}
+ WHERE
+ id = #{id}
+ AND member_id = #{memberId}
+ </update>
+
+
+
+
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1