cqpCow 10 months ago
parent
commit
2c79f07c7e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Service/ImportService.php

+ 3 - 1
app/Service/ImportService.php

@@ -210,7 +210,9 @@ class ImportService extends Service
     }
 
     public function customerImport($array, $user){
-        $head = $user['head']['id'] ?? 0;
+        $head = $user['depart_top'][0] ?? [];
+        $head = $head['depart_id'] ?? 0;
+        if(empty($head)) return [false, '导入异常错误,门店信息丢失'];
 
         // 去除表头
         unset($array[0]);