|
@@ -67,10 +67,10 @@ class CustomerFromThreePlatForm extends Command
|
|
->pluck('id','c_third_platform_id')
|
|
->pluck('id','c_third_platform_id')
|
|
->toArray();
|
|
->toArray();
|
|
$insert_detail = [];
|
|
$insert_detail = [];
|
|
- foreach ($main_detail as $c_third_platform_id => $value){
|
|
|
|
- if(isset($map[$c_third_platform_id])){
|
|
|
|
|
|
+ foreach ($main_detail as $id => $value){
|
|
|
|
+ if(isset($map[$id])){
|
|
foreach ($value as $v){
|
|
foreach ($value as $v){
|
|
- $v['customer_id'] = $map[$c_third_platform_id];
|
|
|
|
|
|
+ $v['customer_id'] = $map[$id] ?? 0;
|
|
$insert_detail[] = $v;
|
|
$insert_detail[] = $v;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -81,7 +81,7 @@ class CustomerFromThreePlatForm extends Command
|
|
|
|
|
|
if(! empty($fail)) {
|
|
if(! empty($fail)) {
|
|
foreach ($fail as $update){
|
|
foreach ($fail as $update){
|
|
- $customer_id = $map[$c_third_platform_id] ?? 0;
|
|
|
|
|
|
+ $customer_id = $map[$update['id']] ?? 0;
|
|
\App\Model\CustomerFromThreePlatForm::where('id', $update['id'])
|
|
\App\Model\CustomerFromThreePlatForm::where('id', $update['id'])
|
|
->update(['del_time' => $update['result'] , 'customer_id' => $customer_id]);
|
|
->update(['del_time' => $update['result'] , 'customer_id' => $customer_id]);
|
|
}
|
|
}
|