Skip to content

Commit 9d61c72

Browse files
committed
test: 记录日志
1 parent 7edf13e commit 9d61c72

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

laravel/app/Http/Repository/MultithreadingRepository.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function setApiExcelId($id)
7171
*/
7272
public function setParam($fileName, $config = [])
7373
{
74+
$this->data = $this->dataSet = null;
7475
$this->fileName = $fileName;
7576
$this->config = $config;
7677
$this->concurrent = $config['concurrent'] ?? 5;
@@ -433,9 +434,14 @@ public function newRequest($url, $appkey)
433434
$promise->wait();
434435

435436
// 处理 data 数据然后返回
437+
$insert = [
438+
'title' => $this->api_excel_id,
439+
'markdown' => json_encode($this->data, JSON_UNESCAPED_UNICODE),
440+
'content' => json_encode($this->dataSet['data'], JSON_UNESCAPED_UNICODE)
441+
];
442+
Article::insert($insert);
443+
436444
$returnArray = [];
437-
Article::insert(['content' => json_encode($this->data, JSON_UNESCAPED_UNICODE)]);
438-
Article::insert(['content' => json_encode($this->dataSet['data'], JSON_UNESCAPED_UNICODE)]);
439445
foreach ($this->data as $k => $v) {
440446
$returnArray[$k]['param'] = $this->dataSet['data'][$k];
441447
$returnArray[$k]['result'] = $v;

0 commit comments

Comments
 (0)