|
@@ -386,13 +386,8 @@
|
|
|
(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
|
|
(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
|
|
on t0.uid = t1.uid
|
|
|
left join user u on t0.uid=u.id
|
|
left join user u on t0.uid=u.id
|
|
|
- where u.channel=0
|
|
|
|
|
- <if test="type==0">
|
|
|
|
|
|
|
+ where u.channel=0 and u.new_channel
|
|
|
and datediff(now(),if(t0.lock_time < t1.last_follow_time,t1.last_follow_time,t0.lock_time))>30
|
|
and datediff(now(),if(t0.lock_time < t1.last_follow_time,t1.last_follow_time,t0.lock_time))>30
|
|
|
- </if>
|
|
|
|
|
- <if test="type==1">
|
|
|
|
|
- and datediff(now(),t0.lock_time)>270
|
|
|
|
|
- </if>
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectWaitReleaseBusiness" resultType="com.goafanti.customer.bo.LockingReleaseBo">
|
|
<select id="selectWaitReleaseBusiness" resultType="com.goafanti.customer.bo.LockingReleaseBo">
|
|
@@ -448,24 +443,14 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectUserDays" resultType="com.goafanti.common.bo.userDaysBo">
|
|
<select id="selectUserDays" resultType="com.goafanti.common.bo.userDaysBo">
|
|
|
- select t0.uid, t0.aid, u.nickname name ,u.channel ,1 type,u.new_channel newChannel
|
|
|
|
|
|
|
+ select t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel
|
|
|
from
|
|
from
|
|
|
(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
|
|
(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
|
|
|
left join
|
|
left join
|
|
|
(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
|
|
(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
|
|
on t0.uid = t1.uid
|
|
|
left join user u on t0.uid=u.id
|
|
left join user u on t0.uid=u.id
|
|
|
- where u.channel=0
|
|
|
|
|
- and datediff(now(),t0.lock_time)> #{x}
|
|
|
|
|
- UNION
|
|
|
|
|
- select t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel
|
|
|
|
|
- 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
|
|
|
|
|
|
|
+ where u.channel=0 and u.new_channel=0
|
|
|
and datediff(now(),if(t0.lock_time < t1.last_follow_time,t1.last_follow_time,t0.lock_time)) > 15
|
|
and datediff(now(),if(t0.lock_time < t1.last_follow_time,t1.last_follow_time,t0.lock_time)) > 15
|
|
|
UNION
|
|
UNION
|
|
|
select t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel
|
|
select t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel
|