From 886265d9085ce5324f98e52c1826cfee99637045 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 16 Jul 2021 14:14:58 +0800
Subject: [PATCH] 202107016

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

diff --git a/gc-user/src/main/resources/mapper/user/AccountMapper.xml b/gc-user/src/main/resources/mapper/user/AccountMapper.xml
index 2984e4b..1621a96 100644
--- a/gc-user/src/main/resources/mapper/user/AccountMapper.xml
+++ b/gc-user/src/main/resources/mapper/user/AccountMapper.xml
@@ -378,4 +378,36 @@
             and a.is_head = 1
     </select>
 
+    <select id="distribDataExport" resultType="com.xzx.gc.user.vo.DistribDataListVo">
+    SELECT
+    a.account_id id,
+    b.nick_name nickname,
+    b.mobile_phone phone,
+    b.regist_time registTime,
+    a.is_head isHead,
+    (select IFNULL(count(1), 0) from xzx_user_head_relate where head_user_id = a.user_id) cnt,
+    (select IFNULL(count(1), 0) from xzx_user_head_details where head_user_id = a.user_id) orderCnt,
+    (select IFNULL(sum(amount), 0) from xzx_user_head_relate where head_user_id = a.user_id) amount,
+    (select IFNULL(sum(score), 0) from xzx_user_head_relate where head_user_id = a.user_id ) score,
+    a.is_prohibit isProhibit
+    FROM
+    xzx_account_info a
+    LEFT JOIN xzx_user_info b on a.user_id = b.user_id
+    <where>
+        1=1
+        and a.is_head = 1
+        <if test="record.queryCol != null and record.queryCol != ''">
+            and (b.nick_name like concat('%',#{record.name},'%') or b.mobile_phone like concat('%',#{record.phone},'%'))
+        </if>
+        <if test="record.reserveTimeStart != null">
+            and b.regist_time >= #{record.reserveTimeStart}
+        </if>
+
+        <if test="record.reserveTimeEnd != null">
+            and b.regist_time &lt;= #{record.reserveTimeEnd}
+        </if>
+    </where>
+    order by id desc
+</select>
+
 </mapper>

--
Gitblit v1.9.1