From d8a08a295c63ee471d368ade1492a8ec71ff836e Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 11 Nov 2022 16:21:34 +0800
Subject: [PATCH] 20221021

---
 src/main/resources/mapper/dapp/DappMemberDao.xml |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/dapp/DappMemberDao.xml b/src/main/resources/mapper/dapp/DappMemberDao.xml
index c59db3d..e49b10a 100644
--- a/src/main/resources/mapper/dapp/DappMemberDao.xml
+++ b/src/main/resources/mapper/dapp/DappMemberDao.xml
@@ -14,7 +14,12 @@
     </select>
 
     <select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappMemberEntity">
-        select * from dapp_member a
+        select a.*,
+               b.total_amount totalAmount,
+               b.frozen_amount frozenAmount,
+               b.available_amount availableAmount
+               from dapp_member a
+        left join dapp_wallet_coin b on a.id = b.member_id
         <where>
 <!--            <if test="record.currentUser != null">-->
 <!--                and referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})-->
@@ -34,6 +39,9 @@
             </if>
             <if test="record.inviteId != null and record.inviteId != ''">
                 and a.invite_id = #{record.inviteId}
+            </if>
+            <if test="record.username != null and record.username != ''">
+                and a.username like CONCAT('%',#{record.username},'%')
             </if>
         </where>
         order by create_time desc
@@ -230,7 +238,8 @@
                 inner join dapp_member b on a.member_id = b.id
         where
             a.total_amount <![CDATA[ >= ]]> 51
-          and b.referer_id = #{inviteId}
+          and
+            (find_in_set(#{inviteId}, b.referer_ids) or b.invite_id = #{inviteId})
           and b.identity = #{identity}
 
     </select>
@@ -238,4 +247,46 @@
     <select id="getAppVersionListInPage" resultType="cc.mrbird.febs.dapp.entity.AppVersion">
         select a.* from app_version a
     </select>
+
+    <select id="getChargeListInPage" resultType="cc.mrbird.febs.dapp.entity.MemberCoinChargeEntity">
+        select
+               a.*,b.username username
+        from member_coin_charge a
+        inner join dapp_member b on b.id = a.member_id
+        <where>
+            <if test="record.username !='' and record.username != null">
+                and b.username = #{record.username}
+            </if>
+        </where>
+        order  by create_time desc
+    </select>
+
+    <select id="selectTotalMemberByRefererIdAndIdentity" resultType="cc.mrbird.febs.dapp.entity.DappMemberEntity">
+        select
+            b.id,
+            b.invite_id,
+            b.referer_id,
+            b.identity,
+            b.referer_ids
+        from
+            dapp_wallet_coin a
+                inner join dapp_member b on a.member_id = b.id
+        where
+            a.total_amount <![CDATA[ >= ]]> 51
+          and b.referer_id = #{inviteId}
+
+    </select>
+
+    <select id="selectMessageListInPage" resultType="cc.mrbird.febs.dapp.entity.DappMessageEntity">
+        select
+        a.*,b.username username
+        from dapp_message a
+        left join dapp_member b on b.id = a.member_id
+        <where>
+            <if test="record.username !='' and record.username != null">
+                and b.username = #{record.username}
+            </if>
+        </where>
+        order  by create_time desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1