|
|
@@ -379,14 +379,13 @@
|
|
|
<select id="selectWaitReleaseCustomer" resultType="com.goafanti.customer.bo.LockingReleaseBo">
|
|
|
select
|
|
|
t0.id, t0.uid, t0.aid, t0.lock_time lockTime,u.new_channel newChannel,
|
|
|
- t1.last_follow_time lastFollowTime,u.nickname userName
|
|
|
+ t1.last_follow_time lastFollowTime,u.nickname userName ,um.channel_type channelType
|
|
|
from
|
|
|
(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)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.uid = t1.uid
|
|
|
- left join user u on t0.uid=u.id
|
|
|
- where u.channel=0 and u.new_channel
|
|
|
+ on t0.uid = t1.uid left join user u on t0.uid=u.id left join user_mid um on t0.uid=um.uid
|
|
|
+ where u.channel=0
|
|
|
and datediff(now(),if(t0.lock_time < t1.last_follow_time,t1.last_follow_time,t0.lock_time))>30
|
|
|
</select>
|
|
|
|