| | |
| | | </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,type,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,platform)
|
| | | 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},#{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})
|
| | | (#{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},#{platform,jdbcType=VARCHAR})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfo"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | |
| | | <if test="phone != null">phone,</if>
|
| | | <if test="state != null">state,</if>
|
| | | <if test="stateDesc != null">state_desc,</if>
|
| | | <if test="platform != null">platform,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | |
| | | <if test="phone != null">#{phone,jdbcType=VARCHAR},</if>
|
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if>
|
| | | <if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR}</if>
|
| | | <if test="platform != null">#{platform,jdbcType=VARCHAR}</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfo">update
|
| | |
| | | LIMIT 1
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="getEffectiveUserInfoByWXOpenId" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_user
|
| | | where wx_open_id=#{wxOpenId} AND state = 0
|
| | | LIMIT 1
|
| | | </select>
|
| | |
|
| | | <select id="getMaxUid" resultType="java.lang.Long">select max(id) from
|
| | | yeshi_ec_user
|
| | | </select>
|
| | |
| | | <if test="userState == 2">
|
| | | AND u.`state` =2 <!-- 封禁用户 -->
|
| | | </if>
|
| | |
|
| | | <if test="userType!=null">
|
| | | AND u.type=#{userType}
|
| | | </if>
|
| | |
|
| | | <if test="startTime != null and startTime !='' ">
|
| | | AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[>=]]>
|
| | | DATE_FORMAT(#{startTime},'%Y%m%d')
|
| | |
| | | </if>
|
| | | <if test="userState == 2">
|
| | | AND u.`state` =2 <!-- 封禁用户 -->
|
| | | </if>
|
| | | <if test="userType!=null">
|
| | | AND u.type=#{userType}
|
| | | </if>
|
| | | <if test="startTime != null and startTime !='' ">
|
| | | AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[>=]]>
|
| | |
| | | u.`createtime`
|
| | | </select>
|
| | |
|
| | | <select id="getInfoByPhoneOrInviteCode" resultMap="BaseResultMap">
|
| | | <select id="getUserInfoByInviteCode" resultMap="BaseResultMap">
|
| | | SELECT * FROM
|
| | | yeshi_ec_user u
|
| | | LEFT JOIN yeshi_ec_user_info_extra uf ON uf.`uie_uid` =
|
| | | u.`id`
|
| | | WHERE
|
| | | uf.`uie_invite_code` IS NOT NULL
|
| | | AND (u.`phone` =#{phone} OR
|
| | | uf.`uie_invite_code` = #{inviteCode})
|
| | | WHERE uf.`uie_invite_code_vip` = #{inviteCode} OR
|
| | | uf.`uie_invite_code` = #{inviteCode}
|
| | | LIMIT 1
|
| | | </select>
|
| | |
|
| | |
| | | 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%'
|
| | | 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>
|
| | |
|