|
|
@@ -1394,11 +1394,13 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
$minId= $orderTracking_min->id;
|
|
|
$logistic = \App\Logistic::query()->where('name','新杰物流')->first();
|
|
|
$logistic_zt = \App\Logistic::query()->where('name','自提')->first();
|
|
|
+
|
|
|
for ($i=$minId;$i<= $maxId;$i+=100){
|
|
|
$orderTrackings = \App\OrderTracking::query()
|
|
|
->where('id','>=',$i)
|
|
|
->where('id','<=',$i+100)
|
|
|
->where('logistic_id','=',0)
|
|
|
+ ->where('created_at','!=','0000-00-00 00:00:00')
|
|
|
->get();
|
|
|
if($orderTrackings->count() ==0) continue;
|
|
|
$update_params = [['id','logistic_id']];
|
|
|
@@ -1414,8 +1416,9 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
];
|
|
|
}
|
|
|
});
|
|
|
-// dd($update_params);
|
|
|
- $service->batchUpdate($update_params);
|
|
|
+ if(count($update_params) > 1){
|
|
|
+ $service->batchUpdate($update_params);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|