From 35370aa39a08c9ba96f9bd2a5e9d6ac721fe98d6 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Mon, 15 Jul 2024 16:06:38 +0800
Subject: [PATCH] 逻辑

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

diff --git a/src/main/resources/mapper/dapp/DappStorageMapper.xml b/src/main/resources/mapper/dapp/DappStorageMapper.xml
index 02ff46d..d34d01a 100644
--- a/src/main/resources/mapper/dapp/DappStorageMapper.xml
+++ b/src/main/resources/mapper/dapp/DappStorageMapper.xml
@@ -74,6 +74,22 @@
     </select>
 
 
+    <select id="selectSumByAmountDesc" resultType="cc.mrbird.febs.dapp.entity.DappStorage">
+        SELECT
+            member_id memberId,
+               sum(amount) amount
+        FROM
+            dapp_storage
+        where
+                date_format(create_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
+        GROUP BY
+            member_id
+        ORDER BY
+            amount DESC
+            limit #{offset},#{count}
+    </select>
+
+
     <select id="selectAmountByAmountDesc" resultType="cc.mrbird.febs.dapp.entity.DappStorage">
         select
             *
@@ -114,4 +130,20 @@
     </select>
 
 
+    <select id="selectSumByAmountDescFiveToFive" resultType="cc.mrbird.febs.dapp.entity.DappStorage">
+        SELECT
+            member_id memberId,
+            sum(amount) amount
+        FROM
+            dapp_storage
+        where
+            create_time &gt;= #{startTime}
+        GROUP BY
+            member_id
+        ORDER BY
+            amount DESC
+            limit #{offset},#{count}
+    </select>
+
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1