From 4520b70c8505d8f964a445b8b8ca5527335c57fd Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 20 Jul 2020 15:27:10 +0800
Subject: [PATCH] 20200720 代码提交

---
 src/main/resources/mapper/modules/MemberMapper.xml |  151 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 151 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/modules/MemberMapper.xml b/src/main/resources/mapper/modules/MemberMapper.xml
index ae6ae7b..3581863 100644
--- a/src/main/resources/mapper/modules/MemberMapper.xml
+++ b/src/main/resources/mapper/modules/MemberMapper.xml
@@ -33,6 +33,38 @@
         order by m.create_time desc
     </select>
     
+    <select id="findMemberAloneInPage" resultType="com.xcong.excoin.modules.member.entity.MemberEntity">
+        SELECT
+			*
+		FROM
+			member m
+		LEFT JOIN member_authentication a ON m.id = a.member_id
+        <where>
+        	FIND_IN_SET('22015141', m.referer_ids)
+            <if test="record != null" >
+                <if test="record.startTime!=null">
+                    and m.create_time >=#{record.startTime}
+                </if>
+                <if test="record.endTime!=null">
+                    and #{record.endTime} >= m.create_time
+                </if>
+                <if test="record.account!=null and record.account!=''">
+                    and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account})
+                </if>
+                <if test="record.accountStatus!=null">
+                    and m.account_status = #{record.accountStatus}
+                </if>
+                <if test="record.accountType != null" >
+                    and m.account_type = #{record.accountType}
+                </if>
+                <if test="record.certifyStatus != null and record.certifyStatus!=''">
+                    and m.certify_status = #{record.certifyStatus}
+                </if>
+            </if>
+        </where>
+        order by m.create_time desc
+    </select>
+    
     <select id="findMemberAccountInfoListInPage" resultType="com.xcong.excoin.modules.trademanage.vo.MemberAccountInfoVo">
 		SELECT
 			m.id,
@@ -96,6 +128,14 @@
 			AND account_status = '1'
 		)
 	</select>
+	<select id="selectTotalAmountUsdtBForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(a.amount),'0')  as amount
+		FROM
+			member_coin_charge a
+		WHERE
+			a.symbol = 'USDT'
+	</select>
 	<select id="selectTotalAmountUsdtSForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
 			IFNULL(SUM(a.amount),'0') as amount
@@ -122,6 +162,15 @@
 				account_type = '2'
 			AND account_status = '1'
 		)
+	</select>
+	<select id="selectTotalAmountUsdtSForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(a.amount),'0') as amount
+		FROM
+			member_coin_withdraw a
+		WHERE
+			a. STATUS = 2
+		AND a.is_inside = 'N'
 	</select>
 	
 	<select id="selectTotalAmountUsdtCZForBasicRealDataBymemberId" resultType="java.lang.String">
@@ -152,6 +201,15 @@
 			AND account_status = '1'
 		)
 	</select>
+	<select id="selectTotalAmountUsdtCZForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(amount_usdt),'0')
+		FROM
+			member_quick_buy_sale
+		WHERE
+			order_type = 'B'
+		AND order_status = 3
+	</select>
 	<select id="selectTotalAmountUsdtTXForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
 			IFNULL(SUM(amount_usdt),'0')
@@ -179,6 +237,15 @@
 				account_type = '2'
 			AND account_status = '1'
 		)
+	</select>
+	<select id="selectTotalAmountUsdtTXForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(amount_usdt),'0')
+		FROM
+			member_quick_buy_sale
+		WHERE
+			order_type = 'S'
+		AND order_status = 2
 	</select>
 	<select id="selectReturnMoneyForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
@@ -229,6 +296,15 @@
 			AND account_status = '1'
 		)
 	</select>
+	<select id="selectClosingpriceForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(a.opening_fee_amount),'0')
+		FROM
+			contract_order a
+		WHERE
+		a.closing_type = '0'
+			and a.order_status = '1'
+	</select>
 	<select id="selectSellClosingpriceForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
 			IFNULL(SUM(a.closing_fee_amount),'0')
@@ -257,6 +333,15 @@
 			AND account_status = '1'
 		)
 	</select>
+	<select id="selectSellClosingpriceForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(a.closing_fee_amount),'0')
+		FROM
+			contract_order a
+		WHERE
+			a.closing_type IN (2,3,4, 5, 6, 7, 8, 9)
+			and a.order_status = '1'
+	</select>
 	<select id="selectRewardratioForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
 			IFNULL(SUM(a.reward_amount), '0')
@@ -284,6 +369,15 @@
 				account_type = '2'
 			AND account_status = '1'
 		)
+	</select>
+	<select id="selectRewardratioForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(a.reward_amount), '0')
+		FROM
+			contract_order a
+		WHERE
+			a.closing_type IN (2,3,4, 5, 6, 7, 8, 9)
+		AND a.order_status = '1'
 	</select>
 	<select id="selectRewardratioForBasicRealDataBymid" resultType="java.lang.String">
 		SELECT
@@ -317,6 +411,19 @@
 					s.member_id
 			) b
 	</select>
+	<select id="selectSFCCForBasicData" resultType="java.lang.String">
+		SELECT
+			COUNT(b.id)
+		FROM
+			(
+				SELECT
+					s.id
+				FROM
+					contract_hold_order s
+				GROUP BY
+					s.member_id
+			) b
+	</select>
 	<select id="selectBBZHForBasicRealData" resultType="java.lang.String">
 		SELECT
 			COUNT(a.id)
@@ -335,6 +442,15 @@
 			AND account_status = '1'
 		)
 	</select>
+	<select id="selectBBZHForBasicData" resultType="java.lang.String">
+		SELECT
+			COUNT(a.id)
+		FROM
+			member_wallet_coin a
+		WHERE
+			a.wallet_code = 'USDT'
+		AND a.available_balance > 1
+	</select>
 	<select id="selectHYZHForBasicRealData" resultType="java.lang.String">
 		SELECT
 			COUNT(a.id)
@@ -352,6 +468,15 @@
 				account_type = '2'
 			AND account_status = '1'
 		)
+	</select>
+	<select id="selectHYZHForBasicData" resultType="java.lang.String">
+		SELECT
+			COUNT(a.id)
+		FROM
+			member_wallet_contract a
+		WHERE
+			a.wallet_code = 'USDT'
+		AND a.total_balance > 1
 	</select>
 	<select id="selectprepriceForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
@@ -376,6 +501,12 @@
 					account_type = '2'
 				AND account_status = '1'
 			)
+	</select>
+	<select id="selectprepriceForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(a.hold_amount),'0')
+		FROM
+			contract_order a
 	</select>
 	<select id="selectBBZCForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
@@ -403,6 +534,14 @@
 			AND account_status = '1'
 		)
 	</select>
+	<select id="selectBBZCForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(available_balance),'0')
+		FROM
+			member_wallet_coin
+		WHERE
+			wallet_code = 'USDT'
+	</select>
 	<select id="selectHYZCForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
 			IFNULL(SUM(total_balance),'0')
@@ -427,6 +566,12 @@
 				AND account_status = '1'
 			)
 	</select>
+	<select id="selectHYZCForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(total_balance),'0')
+		FROM
+			member_wallet_contract
+	</select>
 	<select id="selectDLZCForBasicRealDataBymemberId" resultType="java.lang.String">
 		SELECT
 			IFNULL(SUM(total_balance),'0')
@@ -451,6 +596,12 @@
 				AND account_status = '1'
 			)
 	</select>
+	<select id="selectDLZCForBasicData" resultType="java.lang.String">
+		SELECT
+			IFNULL(SUM(total_balance),'0')
+		FROM
+			member_wallet_agent
+	</select>
 	
 	<select id="selectMemberBylowLevelInviteId" resultType="java.lang.String">
 		 select id from member where FIND_IN_SET(#{inviteId},referer_ids)

--
Gitblit v1.9.1