|
|
@@ -95,8 +95,8 @@
|
|
|
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
|
|
|
- (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} group by buyer_id)t2
|
|
|
- on t0.id = t2.buyer_id
|
|
|
+ (select aid,uid,max(lock_time) as last_sign_time from user_lock_release where aid = #{aid} group by uid)t2
|
|
|
+ on t0.id = t2.uid
|
|
|
left join user_identity b on t0.id = b.uid
|
|
|
left join district_glossory dg1 on b.province = dg1.id
|
|
|
left join district_glossory dg2 on b.city = dg2.id
|
|
|
@@ -415,8 +415,8 @@
|
|
|
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
|
|
|
- (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} group by buyer_id)t2
|
|
|
- on t0.id = t2.buyer_id
|
|
|
+ (select aid,uid,max(lock_time) as last_sign_time from user_lock_release where aid = '1' group by uid)t2
|
|
|
+ on t0.id = t2.uid
|
|
|
left join organization_identity b on t0.id = b.uid
|
|
|
left join district_glossory dg1 on b.location_province = dg1.id
|
|
|
left join district_glossory dg2 on b.location_city = dg2.id
|
|
|
@@ -561,7 +561,7 @@
|
|
|
<select id="selectSignOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
|
|
|
select
|
|
|
t0.uid as uid,
|
|
|
- t0.update_time as lastSignTime,
|
|
|
+ t3.last_sign_time as lastSignTime,
|
|
|
t1.last_follow_time as lastFollowTime,
|
|
|
t2.society_tag as societyTag,
|
|
|
t2.identify_name as name,
|
|
|
@@ -585,6 +585,8 @@
|
|
|
inner join
|
|
|
(select id,aid,share_type,society_tag,identify_name,transfer_time from user where type = 1)t2
|
|
|
on t0.uid = t2.id
|
|
|
+ left join (select aid,uid,max(lock_time) as last_sign_time from user_lock_release where aid = '1' group by uid)t3
|
|
|
+ on t0.uid = t3.uid
|
|
|
left join organization_identity b on t0.uid = b.uid
|
|
|
left join district_glossory dg1 on b.location_province = dg1.id
|
|
|
left join district_glossory dg2 on b.location_city = dg2.id
|
|
|
@@ -624,7 +626,7 @@
|
|
|
from
|
|
|
(select uid,aid,max(update_time) as update_time
|
|
|
from user_business
|
|
|
- where follow_situation=5 and aid=1
|
|
|
+ where follow_situation=5 and aid= #{aid,jdbcType=VARCHAR}
|
|
|
group by uid)t0
|
|
|
inner join
|
|
|
(select id,aid,share_type,society_tag,identify_name,transfer_time from user where type = 1)t2
|