|  | @@ -19,6 +19,7 @@ import com.fs.live.domain.LiveWatchUser;
 | 
	
		
			
				|  |  |  import com.fs.live.service.*;
 | 
	
		
			
				|  |  |  import com.fs.live.vo.LiveWatchUserVO;
 | 
	
		
			
				|  |  |  import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  | +import org.springframework.scheduling.annotation.Scheduled;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Component;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.websocket.*;
 | 
	
	
		
			
				|  | @@ -283,7 +284,7 @@ public class WebSocketServer {
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       *定期将缓存的数据写入数据库
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -//    @Scheduled(fixedRate = 60000) // 每分钟执行一次
 | 
	
		
			
				|  |  | +    @Scheduled(fixedRate = 60000) // 每分钟执行一次
 | 
	
		
			
				|  |  |      public void syncLiveDataToDB() {
 | 
	
		
			
				|  |  |          List<LiveData> liveDatas = liveDataService.getAllLiveDatas(); // 获取所有正在直播的直播间数据
 | 
	
		
			
				|  |  |          if(liveDatas == null)
 |