From f4a0f2acc63d7785eab108419a4e16f5f688cb95 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 18 一月 2020 12:06:27 +0800
Subject: [PATCH] 用户注册信息

---
 fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoCountMapper.xml |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 54 insertions(+), 5 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoCountMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoCountMapper.xml
index d7b5c86..9bf0f59 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoCountMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoCountMapper.xml
@@ -8,20 +8,69 @@
 		<result column="nick_name" property="nickName" jdbcType="VARCHAR" />
 		<result column="portrait" property="portrait" jdbcType="VARCHAR" />
 		<result column="goldCoin" property="goldCoin"	jdbcType="INTEGER" />
-		<result column="goldCoinTotal" property="goldCoinTotal"	jdbcType="INTEGER" />
+	</resultMap>
+	
+	<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfo">
+		<id column="id" property="id" jdbcType="BIGINT" />
+		<result column="identifycode" property="openid" jdbcType="VARCHAR" />
+		<result column="login_type" property="loginType" jdbcType="INTEGER" />
+		<result column="wx_open_id" property="wxOpenId" jdbcType="VARCHAR" />
+		<result column="wx_union_id" property="wxUnionId" jdbcType="VARCHAR" />
+		<result column="nick_name" property="nickName" jdbcType="VARCHAR" />
+		<result column="tbName" property="tbName" jdbcType="VARCHAR" />
+		<result column="tbPic" property="tbPic" jdbcType="VARCHAR" />
+		<result column="wxName" property="wxName" jdbcType="VARCHAR" />
+		<result column="wxPic" property="wxPic" jdbcType="VARCHAR" />
+		<result column="portrait" property="portrait" jdbcType="VARCHAR" />
+		<result column="createtime" property="createtime" jdbcType="BIGINT" />
+		<result column="last_logintime" property="lastLoginTime"
+			jdbcType="BIGINT" />
+		<result column="loginip" property="lastLoginIp" jdbcType="VARCHAR" />
+		<result column="type" property="type" jdbcType="INTEGER" />
+		<result column="appid" property="appId" jdbcType="VARCHAR" />
+		<result column="my_hongBao" property="myHongBao" jdbcType="DECIMAL" />
+		<result column="pay_password" property="payPassword" jdbcType="VARCHAR" />
+		<result column="rank" property="rank" jdbcType="INTEGER" />
+		<result column="phone" property="phone" jdbcType="VARCHAR" />
+		<result column="state" property="state" jdbcType="INTEGER" />
+		<result column="state_desc" property="stateDesc" jdbcType="VARCHAR" />
 	</resultMap>
 	
 	
 	<select id="listByUserGoldCoin" resultMap="UserGoldCoinMapVO">
-		SELECT IFNULL(SUM(d.`td_money`),0) AS goldCoinTotal,u.`id`,u.`nick_name`,u.`portrait`
+		SELECT IFNULL(SUM(d.`td_money`),0) AS goldCoin,u.`id`,u.`nick_name`,u.`portrait`
 		FROM `yeshi_ec_integral_detail` d
 		LEFT JOIN `yeshi_ec_user` u ON u.`id` = d.`td_uid`
 		WHERE 1=1 
-		      <if test="type = 1">AND d.`td_money`<![CDATA[>]]> 0</if>
-		      <if test="type = 2">AND d.`td_money`<![CDATA[<]]> 0</if>
+		      <if test="type == 1">AND d.`td_money`<![CDATA[>]]> 0</if>
+		      <if test="type == 2">AND d.`td_money`<![CDATA[<]]> 0</if>
+		      <if test="key != null and key !='' ">AND d.`td_uid`LIKE '%${key}%'</if>
 		GROUP BY d.`td_uid`
-		ORDER BY goldCoinTotal <if test="type = 1">DESC</if>
+		ORDER BY goldCoin <if test="type == 1">DESC</if>
 		LIMIT #{start},#{count}
 	</select>
 
+
+    <select id="countByUserGoldCoin" resultType="Long">
+		SELECT IFNULL(COUNT(DISTINCT d.`td_uid`),0) FROM `yeshi_ec_integral_detail` d
+		WHERE 1=1 
+		      <if test="type == 1">AND d.`td_money`<![CDATA[>]]> 0</if>
+		      <if test="type == 2">AND d.`td_money`<![CDATA[<]]> 0</if>
+		      <if test="key != null and key !='' ">AND d.`td_uid` LIKE '%${key}%'</if>
+	</select>
+	
+	<select id="listByHasGoldCoin" resultMap="UserGoldCoinMapVO">
+		SELECT IFNULL(t.`uie_gold_coin`,0) AS goldCoin,u.`id`,u.`nick_name`,u.`portrait`
+		FROM `yeshi_ec_user_info_extra` t
+		LEFT JOIN `yeshi_ec_user` u ON t.`uie_uid` = u.`id`
+		WHERE 1=1 <if test="key != null and key !='' ">AND t.`uie_uid`LIKE '%${key}%'</if>
+		ORDER BY t.`uie_gold_coin` DESC
+		LIMIT #{start},#{count}
+	</select>
+
+    <select id="countByHasGoldCoin" resultType="Long">
+		SELECT IFNULL(COUNT(t.`uie_id`),0)FROM `yeshi_ec_user_info_extra` t
+		WHERE 1=1 <if test="key != null and key !='' ">AND t.`uie_uid`LIKE '%${key}%'</if>
+	</select>
+	
 </mapper>

--
Gitblit v1.8.0