From 54c250656c2e471ad48ecaa8ccce16ec9d7eb8bd Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 03 十二月 2019 13:52:38 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

---
 fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml |   58 ++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 38 insertions(+), 20 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 408c70a..91234e2 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
@@ -18,8 +18,7 @@
 		<result column="last_logintime" property="lastLoginTime"
 			jdbcType="BIGINT" />
 		<result column="loginip" property="lastLoginIp" jdbcType="VARCHAR" />
-		<result column="tuiguang_code" property="tuiGuangCode"
-			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" />
@@ -48,8 +47,7 @@
 		<result column="last_logintime" property="lastLoginTime"
 			jdbcType="BIGINT" />
 		<result column="loginip" property="lastLoginIp" jdbcType="VARCHAR" />
-		<result column="tuiguang_code" property="tuiGuangCode"
-			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" />
@@ -87,8 +85,8 @@
 		<result column="showDate" property="showDate" jdbcType="VARCHAR" />
 		<result column="showValue" property="showValue" jdbcType="VARCHAR" />
 	</resultMap>
-	
-	<sql id="Base_Column_List">id,identifycode,login_type,wx_open_id,wx_union_id,nick_name,tbName,tbPic,wxName,wxPic,portrait,createtime,last_logintime,loginip,tuiguang_code,appid,my_hongBao,pay_password,sid,rank,phone,state,state_desc
+
+	<sql id="Base_Column_List">id,identifycode,login_type,wx_open_id,wx_union_id,nick_name,tbName,tbPic,wxName,wxPic,portrait,createtime,last_logintime,loginip,type,appid,my_hongBao,pay_password,sid,rank,phone,state,state_desc
 	</sql>
 	<!-- 涓嶈兘鏌ヨ缂撳瓨 -->
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -117,9 +115,9 @@
 	</delete>
 	<insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfo"
 		useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user
-		(id,identifycode,login_type,wx_open_id,wx_union_id,nick_name,tbName,tbPic,wxName,wxPic,portrait,createtime,last_logintime,loginip,tuiguang_code,appid,my_hongBao,pay_password,sid,rank,phone,state,state_desc)
+		(id,identifycode,login_type,wx_open_id,wx_union_id,nick_name,tbName,tbPic,wxName,wxPic,portrait,createtime,last_logintime,loginip,type,appid,my_hongBao,pay_password,sid,rank,phone,state,state_desc)
 		values
-		(#{id,jdbcType=BIGINT},#{openid,jdbcType=VARCHAR},#{loginType,jdbcType=INTEGER},#{wxOpenId,jdbcType=VARCHAR},#{wxUnionId,jdbcType=VARCHAR},#{nickName,jdbcType=VARCHAR},#{tbName,jdbcType=VARCHAR},#{tbPic,jdbcType=VARCHAR},#{wxName,jdbcType=VARCHAR},#{wxPic,jdbcType=VARCHAR},#{portrait,jdbcType=VARCHAR},#{createtime,jdbcType=BIGINT},#{lastLoginTime,jdbcType=BIGINT},#{lastLoginIp,jdbcType=VARCHAR},#{tuiGuangCode,jdbcType=VARCHAR},#{appId,jdbcType=VARCHAR},#{myHongBao,jdbcType=DECIMAL},#{payPassword,jdbcType=VARCHAR},#{system.id,jdbcType=BIGINT},#{rank,jdbcType=INTEGER},#{phone,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR})
+		(#{id,jdbcType=BIGINT},#{openid,jdbcType=VARCHAR},#{loginType,jdbcType=INTEGER},#{wxOpenId,jdbcType=VARCHAR},#{wxUnionId,jdbcType=VARCHAR},#{nickName,jdbcType=VARCHAR},#{tbName,jdbcType=VARCHAR},#{tbPic,jdbcType=VARCHAR},#{wxName,jdbcType=VARCHAR},#{wxPic,jdbcType=VARCHAR},#{portrait,jdbcType=VARCHAR},#{createtime,jdbcType=BIGINT},#{lastLoginTime,jdbcType=BIGINT},#{lastLoginIp,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{appId,jdbcType=VARCHAR},#{myHongBao,jdbcType=DECIMAL},#{payPassword,jdbcType=VARCHAR},#{system.id,jdbcType=BIGINT},#{rank,jdbcType=INTEGER},#{phone,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR})
 	</insert>
 	<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfo"
 		useGeneratedKeys="true" keyProperty="id">
@@ -139,7 +137,7 @@
 			<if test="createtime != null">createtime,</if>
 			<if test="lastLoginTime != null">last_logintime,</if>
 			<if test="lastLoginIp != null">loginip,</if>
-			<if test="tuiGuangCode != null">tuiguang_code,</if>
+			<if test="type != null">type,</if>
 			<if test="appId != null">appid,</if>
 			<if test="myHongBao != null">my_hongBao,</if>
 			<if test="payPassword != null">pay_password,</if>
@@ -165,7 +163,7 @@
 			<if test="createtime != null">#{createtime,jdbcType=BIGINT},</if>
 			<if test="lastLoginTime != null">#{lastLoginTime,jdbcType=BIGINT},</if>
 			<if test="lastLoginIp != null">#{lastLoginIp,jdbcType=VARCHAR},</if>
-			<if test="tuiGuangCode != null">#{tuiGuangCode,jdbcType=VARCHAR},</if>
+			<if test="type != null">#{type,jdbcType=INTEGER},</if>
 			<if test="appId != null">#{appId,jdbcType=VARCHAR},</if>
 			<if test="myHongBao != null">#{myHongBao,jdbcType=DECIMAL},</if>
 			<if test="payPassword != null">#{payPassword,jdbcType=VARCHAR},</if>
@@ -187,8 +185,8 @@
 		#{portrait,jdbcType=VARCHAR},createtime =
 		#{createtime,jdbcType=BIGINT},last_logintime =
 		#{lastLoginTime,jdbcType=BIGINT},loginip =
-		#{lastLoginIp,jdbcType=VARCHAR},tuiguang_code =
-		#{tuiGuangCode,jdbcType=VARCHAR},appid =
+		#{lastLoginIp,jdbcType=VARCHAR},type =
+		#{type,jdbcType=INTEGER},appid =
 		#{appId,jdbcType=VARCHAR},my_hongBao =
 		#{myHongBao,jdbcType=DECIMAL},pay_password =
 		#{payPassword,jdbcType=VARCHAR},sid =
@@ -213,7 +211,7 @@
 			<if test="createtime != null">createtime=#{createtime,jdbcType=BIGINT},</if>
 			<if test="lastLoginTime != null">last_logintime=#{lastLoginTime,jdbcType=BIGINT},</if>
 			<if test="lastLoginIp != null">loginip=#{lastLoginIp,jdbcType=VARCHAR},</if>
-			<if test="tuiGuangCode != null">tuiguang_code=#{tuiGuangCode,jdbcType=VARCHAR},</if>
+			<if test="type != null">type=#{type,jdbcType=INTEGER},</if>
 			<if test="appId != null">appid=#{appId,jdbcType=VARCHAR},</if>
 			<if test="myHongBao != null">my_hongBao=#{myHongBao,jdbcType=DECIMAL},</if>
 			<if test="payPassword != null">pay_password=#{payPassword,jdbcType=VARCHAR},</if>
@@ -700,15 +698,23 @@
 		yeshi_ec_user u
 		where u.state=0
 	</select>
-	
+
 	<select id="getAutoExtractUser" resultMap="BaseResultMap">
 		SELECT u.* FROM `yeshi_ec_user_info_extra` t
-		LEFT JOIN  `yeshi_ec_user` u ON u.`id` = t.`uie_uid`
-		WHERE t.`uie_auto_extract` = 1 AND t.uie_active_time <![CDATA[>=]]> #{beganDate} AND  t.uie_active_time <![CDATA[<]]> #{endDate}
-			AND (t.`uie_mark` IS NULL OR t.`uie_mark` = '') 
-			AND u.`state` = 0 AND u.`my_hongBao` <![CDATA[>=]]> #{money} 
-			AND u.`wx_open_id` IS NOT NULL AND LENGTH(TRIM(u.`wx_open_id`)) <![CDATA[>]]> 0
-			AND u.`wx_open_id` NOT LIKE 'o_b9%'
+		LEFT JOIN `yeshi_ec_user`
+		u ON u.`id` = t.`uie_uid`
+		WHERE t.`uie_auto_extract` = 1 AND
+		t.uie_active_time <![CDATA[>=]]>
+		#{beganDate} AND t.uie_active_time <![CDATA[<]]>
+		#{endDate}
+		AND (t.`uie_mark` IS NULL OR t.`uie_mark` = '')
+		AND u.`state`
+		= 0 AND u.`my_hongBao` <![CDATA[>=]]>
+		#{money}
+		AND u.`wx_open_id` IS NOT NULL AND
+		LENGTH(TRIM(u.`wx_open_id`)) <![CDATA[>]]>
+		0
+		AND u.`wx_open_id` NOT LIKE 'o_b9%'
 		LIMIT #{start},#{count}
 	</select>
 	
@@ -725,4 +731,16 @@
 		LIMIT #{start},#{count}
 	</select>
 
+
+	<select id="listByType" resultMap="BaseResultMap">
+		select * from yeshi_ec_user u
+		where u.type=#{type} limit #{start},#{count}
+	</select>
+
+	<select id="countByType" resultType="java.lang.Long"
+		parameterType="java.lang.Integer">
+		select count(*) from
+		yeshi_ec_user u where u.type=#{0}
+	</select>
+
 </mapper>

--
Gitblit v1.8.0