master
zhaocheng 4 years ago
parent a9d24fad4c
commit 4a7329a704
  1. 28
      extend/service/CarInfoHandle.php

@ -524,8 +524,11 @@ class CarInfoHandle
$this->setProcess(++$current, $count, $id); $this->setProcess(++$current, $count, $id);
} }
FileSystem::appendWriteFile($filename, $content, false); FileSystem::appendWriteFile($filename, $content, false);
$export_limit != 0 && CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]); if($export_limit != 0 && $export_type == 'success_bmc'){
$export_limit != 0 && $export_type == 'success_bmc' && CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]); CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]);
} else if($export_limit != 0) {
CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]);
}
} else { } else {
$info = $query->limit(3000)->select(); $info = $query->limit(3000)->select();
$limit = $count; $limit = $count;
@ -541,8 +544,11 @@ class CarInfoHandle
$this->setProcess(++$current, $count, $id); $this->setProcess(++$current, $count, $id);
} }
FileSystem::appendWriteFile($filename, $content, false); FileSystem::appendWriteFile($filename, $content, false);
$export_limit != 0 && CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]); if($export_limit != 0 && $export_type == 'success_bmc'){
$export_limit != 0 && $export_type == 'success_bmc' && CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]); CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]);
} else if($export_limit != 0) {
CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]);
}
$limit -= 3000; $limit -= 3000;
$end = $info->pop(); $end = $info->pop();
$lastRegisterDate = is_array($end) ? $end['register_date'] : $end->getData('register_date'); $lastRegisterDate = is_array($end) ? $end['register_date'] : $end->getData('register_date');
@ -575,8 +581,11 @@ class CarInfoHandle
} }
$this->setProcess($row, $count * 1.2, $id); $this->setProcess($row, $count * 1.2, $id);
} }
$export_limit != 0 && CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]); if($export_limit != 0 && $export_type == 'success_bmc'){
$export_limit != 0 && $export_type == 'success_bmc' && CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]); CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]);
} else if($export_limit != 0) {
CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]);
}
} else { } else {
$info = $query->limit(3000)->select(); $info = $query->limit(3000)->select();
$limit = $count; $limit = $count;
@ -590,8 +599,11 @@ class CarInfoHandle
} }
$this->setProcess($row, $count * 1.2, $id); $this->setProcess($row, $count * 1.2, $id);
} }
$export_limit != 0 && CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]); if($export_limit != 0 && $export_type == 'success_bmc'){
$export_limit != 0 && $export_type == 'success_bmc' && CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]); CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]);
} else if($export_limit != 0) {
CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]);
}
$limit -= 3000; $limit -= 3000;
$end = $info->pop(); $end = $info->pop();
$lastRegisterDate = is_array($end) ? $end['register_date'] : $end->getData('register_date'); $lastRegisterDate = is_array($end) ? $end['register_date'] : $end->getData('register_date');

Loading…
Cancel
Save