|
|
@@ -385,6 +385,13 @@
|
|
|
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 < um.last_follow_time,um.last_follow_time,t0.lock_time))>30
|
|
|
+ UNION
|
|
|
+ SELECT t0.id, t0.uid, t0.aid, DATE_FORMAT(t0.lock_time , '%Y-%m-%d') lockTime,u.new_channel newChannel,
|
|
|
+ um.last_follow_time lastFollowTime,u.nickname userName ,um.channel_type channelType,u.share_type shareType
|
|
|
+ from (select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
|
|
|
+ left join `user` u on t0.uid=u.id left join user_mid um on u.id =um.uid
|
|
|
+ where u.share_type in(0) and u.channel=0 and u.new_channel=0
|
|
|
+ and datediff(now(),u.transfer_time) > 270
|
|
|
</select>
|
|
|
|
|
|
<select id="selectWaitReleaseBusiness" resultType="com.goafanti.customer.bo.LockingReleaseBo">
|
|
|
@@ -440,13 +447,20 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserDays" resultType="com.goafanti.common.bo.userDaysBo">
|
|
|
- SELECT u.id uid,u.aid,u.nickname name, u.channel ,u.share_type type,u.new_channel newChannel
|
|
|
- from `user` u left join user_mid um on u.id =um.uid
|
|
|
- where u.share_type in(0,2) and u.channel=0 and u.new_channel=0
|
|
|
- and u.aid =#{aid}
|
|
|
- and datediff(now(),if (um.last_follow_time >u.transfer_time,um.last_follow_time,u.transfer_time)) > 15
|
|
|
- and datediff(now(),if (um.last_follow_time >u.transfer_time,um.last_follow_time,u.transfer_time)) < 30
|
|
|
- UNION
|
|
|
+ SELECT u.id uid,u.aid,u.nickname name, u.channel ,u.share_type type,u.new_channel newChannel
|
|
|
+ from `user` u left join user_mid um on u.id =um.uid
|
|
|
+ where u.share_type in(0,2) and u.channel=0 and u.new_channel=0
|
|
|
+ and u.aid =#{aid}
|
|
|
+ and (datediff(now(),if (um.last_follow_time >u.transfer_time,um.last_follow_time,u.transfer_time)) > 15 )
|
|
|
+ and (datediff(now(),if (um.last_follow_time >u.transfer_time,um.last_follow_time,u.transfer_time)) < 30)
|
|
|
+ UNION
|
|
|
+ SELECT u.id uid,u.aid,u.nickname name, u.channel ,u.share_type type,u.new_channel newChannel
|
|
|
+ from `user` u left join user_mid um on u.id =um.uid
|
|
|
+ where u.share_type in(0,2) and u.channel=0 and u.new_channel=0
|
|
|
+ and u.aid =#{aid}
|
|
|
+ and (datediff(now(),u.transfer_time) > 255)
|
|
|
+ and (datediff(now(),u.transfer_time) < 270)
|
|
|
+ UNION
|
|
|
SELECT u.id uid,u.aid,u.nickname name, u.channel ,u.share_type type,u.new_channel newChannel
|
|
|
from `user` u left join user_mid um on u.id =um.uid
|
|
|
where u.share_type in(0,2) and u.channel=1
|