| 
					
				 | 
			
			
				@@ -21,6 +21,7 @@ import org.apache.commons.collections4.CollectionUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.RandomUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.math.NumberUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.beans.factory.annotation.Value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.data.redis.core.RedisTemplate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,6 +39,10 @@ public class RankService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private RedisTemplate<String, String> redisTemplate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private FeatureRemoteService featureRemoteService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Value("${newRankSwitch:false}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private boolean newRankSwitch; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Value("${newRankAbExpCode:528}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private String newRankAbExpCode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public RankResult rank(RankParam param) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -76,7 +81,8 @@ public class RankService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private List<Video> mergeAndRankRovRecall(RankParam param) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // TODO ab test 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // TODO 抽象成Strategy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        boolean hitTest = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        boolean hitTest = newRankSwitch 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                || CommonCollectionUtils.contains(param.getAbExpCodes(), newRankAbExpCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (hitTest) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return mergeAndRankRovRecallNew(param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 |