|
|
@@ -91,7 +91,7 @@
|
|
|
c.name as industry,
|
|
|
d.name as adminName
|
|
|
from
|
|
|
- (select id,aid,type,share_type,create_time,transfer_time,identify_name,society_tag from user where aid = #{aid} and type = 0 and share_type = 0 and status != 1 order by transfer_time desc)t0
|
|
|
+ (select id,aid,type,share_type,create_time,transfer_time,identify_name,society_tag from user where aid = #{aid} and type = 0 and share_type = 0 and status != 1)t0
|
|
|
left join
|
|
|
(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
|
|
|
on t0.id = t1.uid left join
|
|
|
@@ -124,6 +124,7 @@
|
|
|
<if test="area != null">
|
|
|
and b.area = #{area,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
+ order by t0.transfer_time desc
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -233,8 +234,8 @@
|
|
|
</select>
|
|
|
<select id="selectSignPersonalCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
|
|
|
select
|
|
|
- t0.uid,
|
|
|
- t0.lock_time as lastSignTime,
|
|
|
+ t0.buyer_id as uid,
|
|
|
+ t0.last_sign_time as lastSignTime,
|
|
|
t1.last_follow_time as lastFollowTime,
|
|
|
t2.society_tag as societyTag,
|
|
|
t2.identify_name as name,
|
|
|
@@ -275,7 +276,7 @@
|
|
|
and t2.transfer_time > #{startDate}
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- and t0.transfer_time < #{endDate}
|
|
|
+ and t2.transfer_time < #{endDate}
|
|
|
</if>
|
|
|
<if test="province != null">
|
|
|
and b.province = #{province,jdbcType=INTEGER}
|
|
|
@@ -313,7 +314,7 @@
|
|
|
and t2.transfer_time > #{startDate}
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- and t0.transfer_time < #{endDate}
|
|
|
+ and t2.transfer_time < #{endDate}
|
|
|
</if>
|
|
|
<if test="province != null">
|
|
|
and b.province = #{province,jdbcType=INTEGER}
|
|
|
@@ -416,7 +417,7 @@
|
|
|
c.name as industry,
|
|
|
d.name as adminName
|
|
|
from
|
|
|
- (select id,aid,type,share_type,transfer_time,create_time,identify_name,society_tag from user where aid = #{aid} and type = 1 and share_type = 0 and status != 1 order by transfer_time desc)t0
|
|
|
+ (select id,aid,type,share_type,transfer_time,create_time,identify_name,society_tag from user where aid = #{aid} and type = 1 and share_type = 0 and status != 1)t0
|
|
|
left join
|
|
|
(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
|
|
|
on t0.id = t1.uid left join
|
|
|
@@ -449,6 +450,7 @@
|
|
|
<if test="area != null">
|
|
|
and b.location_area = #{area,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
+ order by t0.transfer_time desc
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -616,6 +618,7 @@
|
|
|
<if test="area != null">
|
|
|
and b.location_area = #{area,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
+ order by t2.transfer_time desc
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
</if>
|