|
...
|
...
|
@@ -43,7 +43,6 @@ class DownloadProject extends Command |
|
|
|
$data = $this->downloadProduct();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
|
|
|
|
return true;
|
|
|
|
// return $this->exportData($data);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -62,6 +61,7 @@ class DownloadProject extends Command |
|
|
|
if($detailInfo === false || ($detailInfo['content']['content'] == null)){
|
|
|
|
$v['content'] = '';
|
|
|
|
}else{
|
|
|
|
echo date('Y-m-d H:i:s') . '数据详情$v:'. json_encode($detailInfo) . PHP_EOL;
|
|
|
|
$v['content'] = $detailInfo['content']['content'];
|
|
|
|
}
|
|
|
|
$v['url'] = 'https://www.autsikinta.com/' . getRouteMap(RouteMap::SOURCE_PRODUCT,$v['id']);
|
|
...
|
...
|
@@ -120,30 +120,21 @@ class DownloadProject extends Command |
|
|
|
$sheet = $spreadsheet->getActiveSheet();
|
|
|
|
// 添加表头
|
|
|
|
$sheet->setCellValue('A1', '产品名称');
|
|
|
|
$sheet->setCellValue('B1', '产品描述');
|
|
|
|
$sheet->setCellValue('B1', '产品短描述');
|
|
|
|
$sheet->setCellValue('C1', '产品内容');
|
|
|
|
$sheet->setCellValue('D1', '产品路由');
|
|
|
|
$sheet->setCellValue('E1', '产品分类');
|
|
|
|
$sheet->setCellValue('F1', '产品状态');
|
|
|
|
$sheet->setCellValue('G1', '产品主图');
|
|
|
|
$rowCount = 2;
|
|
|
|
// $allData = $this->countAll();
|
|
|
|
foreach ($data as $v) {
|
|
|
|
$domain = (new DomainInfo())->getDomain($v['deploy_optimize']['domain'] ?? 0);
|
|
|
|
if($v['type'] == 1){
|
|
|
|
$status = '建站中';
|
|
|
|
}elseif ($v['type'] == 2){
|
|
|
|
$status = '优化中';
|
|
|
|
}elseif ($v['type'] == 3){
|
|
|
|
$status = '建站后';
|
|
|
|
}else{
|
|
|
|
$status = '';
|
|
|
|
}
|
|
|
|
$sheet->setCellValue('A' . $rowCount, $v['id']);
|
|
|
|
$sheet->setCellValue('B' . $rowCount, $v['title']);
|
|
|
|
$sheet->setCellValue('C' . $rowCount, $domain);
|
|
|
|
$sheet->setCellValue('D' . $rowCount, $status);
|
|
|
|
$sheet->setCellValue('E' . $rowCount, $v['remain_day']);
|
|
|
|
$sheet->setCellValue('A' . $rowCount, $v['title']);
|
|
|
|
$sheet->setCellValue('B' . $rowCount, $v['intro']);
|
|
|
|
$sheet->setCellValue('C' . $rowCount, $v['content']);
|
|
|
|
$sheet->setCellValue('D' . $rowCount, $v['url']);
|
|
|
|
$sheet->setCellValue('E' . $rowCount, $v['category_id_text']);
|
|
|
|
$sheet->setCellValue('F' . $rowCount, '发布中');
|
|
|
|
$sheet->setCellValue('G' . $rowCount, $v['images']);
|
|
|
|
$rowCount++;
|
|
|
|
}
|
|
|
|
// 创建一个新的 Excel Writer 对象
|
...
|
...
|
|