wesmiler hace 2 años
padre
commit
ed8ca72e95
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      app/Services/Api/VideoService.php

+ 2 - 1
app/Services/Api/VideoService.php

@@ -207,7 +207,8 @@ class VideoService extends BaseService
             }
         })->count('a.id');
 
-        if($total > 3){
+        // 随机优先匹配推送
+        if($total > 3 && rand(100,999) > 300){
             // 关联推荐数据
             $list = $countModel->selectRaw($field)
                 ->orderByRaw($uids?DB::raw("FIND_IN_SET(user_id,'".implode(',', $uids)."')"):'lev_a.create_time desc')