| 
					
				 | 
			
			
				@@ -17,6 +17,7 @@ import com.tzld.piaoquan.recommend.server.service.flowpool.FlowPoolService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.recommend.server.service.rank.RankParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.recommend.server.service.rank.RankResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.recommend.server.service.rank.RankRouter; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.tzld.piaoquan.recommend.server.service.rank.bo.UserSRBO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.recommend.server.service.rank.bo.UserShareReturnProfile; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.recommend.server.service.recall.RecallParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.recommend.server.service.recall.RecallResult; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -372,6 +373,7 @@ public class RecommendService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         param.setUserShareDepth(request.getUserShareDepth()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         param.setPageNum(request.getPageNum()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         param.setRootSessionId(request.getRootSessionId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        param.setUserRTShareList(getUserRTShareList(request.getShareListList())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return param; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -387,6 +389,7 @@ public class RecommendService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RecallParam recallParam = convertToRecallParam(param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         recallParam.setUserProfile(userProfile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         recallParam.setHeadInfo(headVideoInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        recallParam.setUserRTShareList(param.getUserRTShareList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RecallResult recallResult = recallService.recall(recallParam); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         long recallTime = stopwatch.elapsed(TimeUnit.MILLISECONDS); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -397,6 +400,7 @@ public class RecommendService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RankParam rankParam = convertToRankParam(param, recallResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rankParam.setUserProfile(userProfile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rankParam.setHeadInfo(headVideoInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        rankParam.setUserRTShareList(param.getUserRTShareList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RankResult rankResult = rankRouter.rank(rankParam); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         long rankTime = stopwatch.elapsed(TimeUnit.MILLISECONDS); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -570,5 +574,25 @@ public class RecommendService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return "公众号代运营-Daily"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private List<UserSRBO> getUserRTShareList(List<VideoActionInfoProto> list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<UserSRBO> rtShareList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (null != list && !list.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            long startTs = System.currentTimeMillis() / 1000L - 2 * 3600L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (VideoActionInfoProto videoAction : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (null != videoAction) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    long id = videoAction.getVideoId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    long ts = videoAction.getTs(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (ts > startTs && rtShareList.size() < 4) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        UserSRBO userSRBO = new UserSRBO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        userSRBO.setId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        userSRBO.setTs(ts); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        rtShareList.add(userSRBO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return rtShareList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |