From e915a40b79552686b8d8a8cfc48a341fa2c0f518 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期三, 27 十一月 2019 18:08:47 +0800
Subject: [PATCH] 订单统计 + 资金明细

---
 fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
index 7be19c6..408c70a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
@@ -711,5 +711,18 @@
 			AND u.`wx_open_id` NOT LIKE 'o_b9%'
 		LIMIT #{start},#{count}
 	</select>
+	
+	<select id="getAutoExtractUserTo1212" resultMap="BaseResultMap">
+		SELECT u.* FROM (SELECT v2.`hb_uid` FROM `yeshi_ec_hongbao_v2` v2
+		WHERE <![CDATA[v2.`hb_create_time` > '2019-01-01' AND v2.`hb_create_time` < '2019-06-18']]>
+		GROUP BY hb_uid)h
+		LEFT JOIN `yeshi_ec_user_info_extra` t ON t.`uie_uid` = h.hb_uid
+		LEFT JOIN  `yeshi_ec_user` u ON u.`id` = t.`uie_uid`
+		WHERE <![CDATA[ t.uie_active_time < '2019-06-19']]> AND (t.`uie_mark` IS NULL OR t.`uie_mark` = '') 
+			AND u.`state` = 0 AND u.`my_hongBao`<![CDATA[> 1]]>
+			AND u.`wx_open_id` IS NOT NULL AND <![CDATA[LENGTH(TRIM(u.`wx_open_id`)) > 0]]>
+			AND u.`wx_open_id` NOT LIKE 'o_b9%'
+		LIMIT #{start},#{count}
+	</select>
 
 </mapper>

--
Gitblit v1.8.0