|
...
|
...
|
@@ -70,7 +70,7 @@ class DeleteNewsCategory extends Command |
|
|
|
}
|
|
|
|
foreach ($list as $item){
|
|
|
|
echo 'start:' . $item['id'] . PHP_EOL;
|
|
|
|
try {
|
|
|
|
// try {
|
|
|
|
$projectModel = new Project();
|
|
|
|
$projectInfo = $projectModel->read(['id'=>$item['data']['project_id']]);
|
|
|
|
if($projectInfo === false){
|
|
...
|
...
|
@@ -81,10 +81,10 @@ class DeleteNewsCategory extends Command |
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
$noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]);
|
|
|
|
echo 'success:' . $item['id'] . PHP_EOL;
|
|
|
|
}catch (\Exception $e){
|
|
|
|
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
|
|
|
|
errorLog('项目初始化失败', $item, $e);
|
|
|
|
}
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
|
|
|
|
// errorLog('项目初始化失败', $item, $e);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|