From 04b73bbb2b20f0c3bef5c8ca94edf97eeb9d0994 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Sat, 11 May 2024 11:35:26 +0800
Subject: [PATCH] 香港新环境

---
 src/main/resources/mapper/dapp/DappSystemProfitDao.xml |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/dapp/DappSystemProfitDao.xml b/src/main/resources/mapper/dapp/DappSystemProfitDao.xml
index 295147f..b18a875 100644
--- a/src/main/resources/mapper/dapp/DappSystemProfitDao.xml
+++ b/src/main/resources/mapper/dapp/DappSystemProfitDao.xml
@@ -8,7 +8,6 @@
         where state = #{state}
         order by id ASC
         limit 1
-        for update
     </select>
 
     <select id="selectByIdForUpdate" resultType="cc.mrbird.febs.dapp.entity.DappSystemProfit">
@@ -16,7 +15,6 @@
         from dapp_system_profit a
         where a.id = #{id}
         and a.state = #{state}
-        for update
     </select>
 
     <update id="updateLevelProfitById">
@@ -66,6 +64,9 @@
              dapp_system_profit a
         inner join dapp_member b on a.member_id = b.id
         <where>
+            <if test="record.id != '' and record.id != null">
+                and a.id = #{record.id}
+            </if>
             <if test="record.address != '' and record.address != null">
                 and b.address = #{record.address}
             </if>
@@ -81,6 +82,7 @@
         a.create_time createTime,
         a.amount amount,
         a.status status,
+        a.from_hash fromHash,
         a.type type,
         b.address address
         from
@@ -90,4 +92,20 @@
         order by a.create_time asc
     </select>
 
+    <select id="selectDappSysstemProfitByState" resultType="cc.mrbird.febs.dapp.entity.DappSystemProfit">
+        select
+            a.*
+        from
+            dapp_system_profit a
+        where a.state = #{state}
+        order by a.id asc
+    </select>
+
+    <select id="selectByMemberId" resultType="cc.mrbird.febs.dapp.entity.DappSystemProfit">
+        select a.*
+        from dapp_system_profit a
+        where member_id = #{memberId}
+            limit 1
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1