From eda28374083dbb6cf58c4d1fb6794e6d261c2a45 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 23 Sep 2021 15:47:03 +0800
Subject: [PATCH] 20210923

---
 src/main/resources/mapper/modules/MallMemberMapper.xml |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index f5cfcb7..148abc5 100644
--- a/src/main/resources/mapper/modules/MallMemberMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -7,10 +7,14 @@
         <where>
             <if test="record != null" >
                 <if test="record.name!=null and record.name!=''">
-                    and (m.name like concat('%',  #{record.name},'%')
+                    and m.name like concat('%',  #{record.name},'%')
                 </if>
-                <if test="record.phone!=null and record.phone!=''">
-                    and (m.phone like concat('%',  #{record.phone},'%') or m.email like concat('%',  #{record.phone},'%'))
+                <if test="record.account!=null and record.account!=''">
+                    and (
+                        m.phone like concat('%',  #{record.account},'%')
+                        or m.email like concat('%',  #{record.account},'%')
+                        or m.invite_id like concat('%',  #{record.account},'%')
+                        )
                 </if>
                 <if test="record.accountStatus!=null">
                     and m.account_status = #{record.accountStatus}
@@ -23,6 +27,21 @@
         order by m.CREATED_TIME desc
     </select>
 
+    <select id="getMallMemberInfoById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo">
+        SELECT a.name,
+               a.phone,
+               a.email,
+               a.sex,
+               a.invite_id,
+               a.level,
+               a.account_status,
+               a.CREATED_TIME,
+               b.name
+               FROM mall_member a
+            LEFT JOIN mall_member b on a.referrer_id = b.invite_id
+            where a.id = #{id}
+    </select>
+
     <select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember">
         select * from mall_member where phone=#{account} or email=#{account}
     </select>

--
Gitblit v1.9.1