|
|
@@ -379,7 +379,7 @@
|
|
|
<select id="selectWaitReleaseCustomer" resultType="com.goafanti.customer.bo.LockingReleaseBo">
|
|
|
select
|
|
|
t0.id, t0.uid, t0.aid, DATE_FORMAT(t0.lock_time , '%Y-%m-%d') lockTime,u.new_channel newChannel,
|
|
|
- t1.last_follow_time lastFollowTime,u.nickname userName ,um.channel_type channelType
|
|
|
+ t1.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
|
|
|
@@ -442,25 +442,17 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserDays" resultType="com.goafanti.common.bo.userDaysBo">
|
|
|
- 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 and u.new_channel=0
|
|
|
- and datediff(now(),if(t0.lock_time < t1.last_follow_time,t1.last_follow_time,t0.lock_time)) > 15
|
|
|
+ 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
|
|
|
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=1
|
|
|
- and datediff(now(),t0.lock_time)> #{y}
|
|
|
+ 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
|
|
|
+ and u.aid =#{aid}
|
|
|
+ and datediff(now(),u.transfer_time)> #{y}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectChannelUserDays" resultType="com.goafanti.common.bo.userDaysBo">
|