作者 lyh

gx

@@ -217,7 +217,7 @@ class VideoTask extends Command @@ -217,7 +217,7 @@ class VideoTask extends Command
217 } 217 }
218 if (count($productIds)<7){ 218 if (count($productIds)<7){
219 $product_all_id = Product::where("project_id", $project_id)->whereNotIn('id', $productIds)->where("status",1)->pluck('id')->toArray(); 219 $product_all_id = Product::where("project_id", $project_id)->whereNotIn('id', $productIds)->where("status",1)->pluck('id')->toArray();
220 - $product_id = array_rand($product_all_id, 30-count($productIds)); 220 + $product_id = array_rand($product_all_id, 40-count($productIds));
221 $randomData = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get(); 221 $randomData = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get();
222 $products = $productsQuery->merge($randomData); 222 $products = $productsQuery->merge($randomData);
223 }else{ 223 }else{
@@ -225,7 +225,7 @@ class VideoTask extends Command @@ -225,7 +225,7 @@ class VideoTask extends Command
225 } 225 }
226 }else{ 226 }else{
227 $product_all_id = Product::where("project_id", $project_id)->where("status",1)->pluck('id')->toArray(); 227 $product_all_id = Product::where("project_id", $project_id)->where("status",1)->pluck('id')->toArray();
228 - $product_id = array_rand($product_all_id, 30); 228 + $product_id = array_rand($product_all_id, 40);
229 $products = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get(); 229 $products = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get();
230 } 230 }
231 } 231 }