From a833e22f6a258dfb66358d281524927ce326fe69 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 16 Sep 2021 17:19:21 +0800
Subject: [PATCH] 20210916

---
 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 3d724fb..7bb5e5d 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,4 +27,19 @@
         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>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1