From bfbb03c514b9e60485ea13d5679e6af2e8aeb354 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 23 Nov 2022 09:44:23 +0800
Subject: [PATCH] 20221117

---
 src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml b/src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml
index 477ea42..3b6c401 100644
--- a/src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml
+++ b/src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml
@@ -39,4 +39,36 @@
             and a.is_inside = #{type}
     </select>
 
+    <select id="selectTotalAmountByCreateTimeAndInviteId" resultType="cc.mrbird.febs.dapp.vo.AdminMemberWithdrawVo">
+        SELECT
+            IFNULL(sum(amount),0) AS totalWithdraw,
+            count(id) AS sheetOut
+        FROM
+            member_coin_withdraw
+        WHERE
+        is_inside = 'N'
+        and date_format(create_time, '%Y-%m-%d') = date_format(#{createTime}, '%Y-%m-%d')
+        <if test="description !=null and description != ''">
+            and member_id IN (
+            SELECT
+            id
+            FROM
+            dapp_member
+            WHERE
+            FIND_IN_SET(#{description}, referer_ids)
+            )
+        </if>
+
+    </select>
+
+    <select id="selectTotalAmountByMemberIdAndType" resultType="java.math.BigDecimal">
+        SELECT
+        IFNULL(sum(amount),0)
+        FROM
+        member_coin_withdraw
+        WHERE
+        is_inside = #{inside}
+        and member_id = #{memberId}
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1