|
@@ -19,6 +19,7 @@ use App\Models\OrderExtraData;
|
19
|
19
|
use App\Models\OrderMcn;
|
20
|
20
|
use App\RedisModel;
|
21
|
21
|
use Illuminate\Console\Command;
|
|
22
|
+use Maatwebsite\Excel\Facades\Excel;
|
22
|
23
|
|
23
|
24
|
class Test extends Command
|
24
|
25
|
{
|
|
@@ -29,7 +30,8 @@ class Test extends Command
|
29
|
30
|
{
|
30
|
31
|
\DB::connection()->disableQueryLog();
|
31
|
32
|
// $this->exportData();
|
32
|
|
- $this->test();
|
|
33
|
+// $this->test();
|
|
34
|
+ $this->importData();
|
33
|
35
|
}
|
34
|
36
|
|
35
|
37
|
public function test() {
|
|
@@ -74,6 +76,14 @@ class Test extends Command
|
74
|
76
|
}
|
75
|
77
|
}
|
76
|
78
|
|
|
79
|
+ public function importData() {
|
|
80
|
+ $file = public_path('测试.xlsx');
|
|
81
|
+ Excel::load($file, function($reader){
|
|
82
|
+ $data = $reader->all();
|
|
83
|
+ dd($data);
|
|
84
|
+ });
|
|
85
|
+ }
|
|
86
|
+
|
77
|
87
|
public function exportData()
|
78
|
88
|
{
|
79
|
89
|
$arr = [
|