wesmiler 2 năm trước cách đây
mục cha
commit
ed8ca72e95
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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');
         })->count('a.id');
 
 
-        if($total > 3){
+        // 随机优先匹配推送
+        if($total > 3 && rand(100,999) > 300){
             // 关联推荐数据
             // 关联推荐数据
             $list = $countModel->selectRaw($field)
             $list = $countModel->selectRaw($field)
                 ->orderByRaw($uids?DB::raw("FIND_IN_SET(user_id,'".implode(',', $uids)."')"):'lev_a.create_time desc')
                 ->orderByRaw($uids?DB::raw("FIND_IN_SET(user_id,'".implode(',', $uids)."')"):'lev_a.create_time desc')