cqpCow 10 місяців тому
батько
коміт
2c79f07c7e
1 змінених файлів з 3 додано та 1 видалено
  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]);