|
|
@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="withdrawFinish" column="withdraw_finish" />
|
|
|
<result property="totalCommission" column="total_commission" />
|
|
|
<result property="mayWithdraw" column="may_withdraw" />
|
|
|
+ <result property="appCreateTime" column="app_create_time" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserVo">
|
|
|
@@ -384,7 +385,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
ucu.company_id,
|
|
|
ucu.project_id,
|
|
|
fs_user.integral,
|
|
|
- if(fs_user.pay_count>0,1,0) as isBuy
|
|
|
+ if(fs_user.pay_count>0,1,0) as isBuy,
|
|
|
+ fs_user.app_create_time
|
|
|
FROM
|
|
|
fs_user
|
|
|
left join fs_user_company_user ucu on ucu.user_id = fs_user.user_id
|
|
|
@@ -401,7 +403,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<when test="companyUserIds != null and companyUserIds.size > 0">
|
|
|
AND ucu.company_user_id in
|
|
|
<foreach collection="companyUserIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
- ${item}
|
|
|
+ #{item}
|
|
|
</foreach>
|
|
|
</when>
|
|
|
<when test="companyUserId != null and companyUserId != '' ">
|
|
|
@@ -434,6 +436,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="projectId != null">
|
|
|
AND ucu.project_id = #{projectId}
|
|
|
</if>
|
|
|
+ <if test="appCreateTimeStart != null and appCreateTimeEnd != null">
|
|
|
+ AND fs_user.app_create_time BETWEEN #{appCreateTimeStart} AND #{appCreateTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="isDownloadApp != null">
|
|
|
+ <choose>
|
|
|
+ <when test="isDownloadApp == 1">
|
|
|
+ and ((fs_user.source is not null and fs_user.source != '') or fs_user.login_device is not null or fs_user.app_create_time is not null)
|
|
|
+ </when>
|
|
|
+ <when test="isDownloadApp == 0">
|
|
|
+ and ((fs_user.source is null or fs_user.source = '') and fs_user.login_device is null and fs_user.app_create_time is null)
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
limit ${(pageNum-1)*pageSize},${pageSize}
|
|
|
</select>
|
|
|
@@ -480,6 +495,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="projectId != null">
|
|
|
AND ucu.project_id = #{projectId}
|
|
|
</if>
|
|
|
+ <if test="appCreateTimeStart != null and appCreateTimeEnd != null">
|
|
|
+ AND fs_user.app_create_time BETWEEN #{appCreateTimeStart} AND #{appCreateTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="isDownloadApp != null">
|
|
|
+ <choose>
|
|
|
+ <when test="isDownloadApp == 1">
|
|
|
+ and ((fs_user.source is not null and fs_user.source != '') or fs_user.login_device is not null or fs_user.app_create_time is not null)
|
|
|
+ </when>
|
|
|
+ <when test="isDownloadApp == 0">
|
|
|
+ and ((fs_user.source is null or fs_user.source = '') and fs_user.login_device is null and fs_user.app_create_time is null)
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<update id="transferCompanyUser">
|
|
|
@@ -625,6 +653,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="payCount != null">pay_count,</if>
|
|
|
<if test="spreadCount != null">spread_count,</if>
|
|
|
<if test="appId != null">app_id,</if>
|
|
|
+ <if test="appCreateTime != null">app_create_time,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="nickName != null">#{nickName},</if>
|
|
|
@@ -675,6 +704,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="payCount != null">#{payCount},</if>
|
|
|
<if test="spreadCount != null">#{spreadCount},</if>
|
|
|
<if test="appId != null">#{appId},</if>
|
|
|
+ <if test="appCreateTime != null">#{appCreateTime},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -735,6 +765,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="orderCount != null">order_count = #{orderCount},</if>
|
|
|
<if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
<if test="appId != null">app_id = #{appId},</if>
|
|
|
+ <if test="appCreateTime != null">app_create_time = #{appCreateTime},</if>
|
|
|
<if test="invitedBySalesId != null">invited_by_sales_id = #{invitedBySalesId},</if>
|
|
|
<if test="withdrawIntegral != null">withdraw_integral = #{withdrawIntegral},</if>
|
|
|
<if test="withdrawFinish != null">withdraw_finish = #{withdrawFinish},</if>
|
|
|
@@ -2515,6 +2546,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="projectId != null">
|
|
|
AND ucu.project_id = #{projectId}
|
|
|
</if>
|
|
|
+ <if test="appCreateTimeStart != null and appCreateTimeEnd != null">
|
|
|
+ AND fs_user.app_create_time BETWEEN #{appCreateTimeStart} AND #{appCreateTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="isDownloadApp != null">
|
|
|
+ <choose>
|
|
|
+ <when test="isDownloadApp == 1">
|
|
|
+ and ((fs_user.source is not null and fs_user.source != '') or fs_user.login_device is not null or fs_user.app_create_time is not null)
|
|
|
+ </when>
|
|
|
+ <when test="isDownloadApp == 0">
|
|
|
+ and ((fs_user.source is null or fs_user.source = '') and fs_user.login_device is null and fs_user.app_create_time is null)
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -2533,7 +2577,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
fs_user.integral,
|
|
|
if(fs_user.pay_count>0,1,0) as isBuy,
|
|
|
fs_user.source,
|
|
|
- fs_user.login_device as loginDevice
|
|
|
+ fs_user.login_device as loginDevice,
|
|
|
+ fs_user.app_create_time
|
|
|
FROM fs_user
|
|
|
left join fs_user_company_user ucu on ucu.user_id = fs_user.user_id
|
|
|
<where>
|
|
|
@@ -2578,6 +2623,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="projectId != null">
|
|
|
AND ucu.project_id = #{projectId}
|
|
|
</if>
|
|
|
+ <if test="appCreateTimeStart != null and appCreateTimeEnd != null">
|
|
|
+ AND fs_user.app_create_time BETWEEN #{appCreateTimeStart} AND #{appCreateTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="isDownloadApp != null">
|
|
|
+ <choose>
|
|
|
+ <when test="isDownloadApp == 1">
|
|
|
+ and ((fs_user.source is not null and fs_user.source != '') or fs_user.login_device is not null or fs_user.app_create_time is not null)
|
|
|
+ </when>
|
|
|
+ <when test="isDownloadApp == 0">
|
|
|
+ and ((fs_user.source is null or fs_user.source = '') and fs_user.login_device is null and fs_user.app_create_time is null)
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|