作者 lyh

gx

@@ -220,7 +220,7 @@ class VideoTask extends Command @@ -220,7 +220,7 @@ class VideoTask extends Command
220 if (count($productIds)<7){ 220 if (count($productIds)<7){
221 $product_all_id = Product::where("project_id", $project_id)->whereNotIn('id', $productIds)->where("status",Product::STATUS_ON)->pluck('id')->toArray(); 221 $product_all_id = Product::where("project_id", $project_id)->whereNotIn('id', $productIds)->where("status",Product::STATUS_ON)->pluck('id')->toArray();
222 $number = 40; 222 $number = 40;
223 - $product_id = array_rand($product_all_id, min(count($product_all_id, $number-count($productIds)))); 223 + $product_id = array_rand($product_all_id, min($product_all_id, $number-count($productIds)));
224 $randomData = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get(); 224 $randomData = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get();
225 $products = $productsQuery->merge($randomData); 225 $products = $productsQuery->merge($randomData);
226 }else{ 226 }else{
@@ -229,7 +229,7 @@ class VideoTask extends Command @@ -229,7 +229,7 @@ class VideoTask extends Command
229 }else{ 229 }else{
230 $product_all_id = Product::where("project_id", $project_id)->where("status",Product::STATUS_ON)->pluck('id')->toArray(); 230 $product_all_id = Product::where("project_id", $project_id)->where("status",Product::STATUS_ON)->pluck('id')->toArray();
231 $number = 40; 231 $number = 40;
232 - $product_id = array_rand($product_all_id, min(count($product_all_id, $number-count($productIds)))); 232 + $product_id = array_rand($product_all_id, min($product_all_id, $number-count($productIds)));
233 $products = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get(); 233 $products = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get();
234 } 234 }
235 } 235 }
@@ -25,7 +25,7 @@ class Kernel extends ConsoleKernel @@ -25,7 +25,7 @@ class Kernel extends ConsoleKernel
25 $schedule->command('rank_data_recomm_domain')->dailyAt('01:40')->withoutOverlapping(1); // 排名数据-引荐域名,每周一凌晨执行一次 25 $schedule->command('rank_data_recomm_domain')->dailyAt('01:40')->withoutOverlapping(1); // 排名数据-引荐域名,每周一凌晨执行一次
26 $schedule->command('rank_data_week')->dailyAt('01:00')->withoutOverlapping(1); // 排名数据,每周一凌晨执行一次 26 $schedule->command('rank_data_week')->dailyAt('01:00')->withoutOverlapping(1); // 排名数据,每周一凌晨执行一次
27 // $schedule->command('share_user')->dailyAt('01:00')->withoutOverlapping(1); // 清除用户ayr_share数据,每天凌晨1点执行一次 27 // $schedule->command('share_user')->dailyAt('01:00')->withoutOverlapping(1); // 清除用户ayr_share数据,每天凌晨1点执行一次
28 - $schedule->command('count')->dailyAt('01:30')->withoutOverlapping(1); //每天凌晨1点执行一次 28 + $schedule->command('count')->dailyAt('00:30')->withoutOverlapping(1); //每天凌晨1点执行一次
29 $schedule->command('service_count')->dailyAt('01:00')->withoutOverlapping(1); //服务器使用情况,每天凌晨1点执行一次 29 $schedule->command('service_count')->dailyAt('01:00')->withoutOverlapping(1); //服务器使用情况,每天凌晨1点执行一次
30 $schedule->command('web_traffic 1')->everyThirtyMinutes(); // 引流 1-3个月的项目,半小时一次 30 $schedule->command('web_traffic 1')->everyThirtyMinutes(); // 引流 1-3个月的项目,半小时一次
31 $schedule->command('web_traffic 2')->cron('*/18 * * * *'); // 引流 4-8个月的项目,18分钟一次 31 $schedule->command('web_traffic 2')->cron('*/18 * * * *'); // 引流 4-8个月的项目,18分钟一次