Browse Source

直播间在线人数调整值

沈静伟 3 years ago
parent
commit
b185c56ef3

+ 1 - 1
src/dsb/com/cnd3b/service/SQL/直播频道在线用户调整数更新.sql

@@ -1,7 +1,7 @@
 update tlive_usercount set fadjustcount=t.fadjustcount from (
 	select t.channelid,t.time,(case when t.fadjustcount+t.fadjustcount2<0 or t.fadjustcount+t.fadjustcount2>200 then t.fadjustcount else t.fadjustcount+t.fadjustcount2 end )as fadjustcount from (
 	select t.channelid,t.time,t.fadjustcount,
-	case when RAND()>0.4 then cast(floor(rand()*10) as int ) else -cast(floor(rand()*7) as int ) end as fadjustcount2 
+	case when RAND()>0.5 then cast(floor(rand()*20) as int ) else -cast(floor(rand()*12) as int ) end as fadjustcount2
 	from (
 	select ROW_NUMBER()over(partition by channelid order by time desc)as row, channelid,time,count,isnull(fadjustcount,0)as fadjustcount from tlive_usercount where fadjustcount is not null
 	and channelid in $channelid$