作者 lyh

gx

... ... @@ -67,7 +67,7 @@ class DeleteProductCategory 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){
... ... @@ -78,10 +78,10 @@ class DeleteProductCategory 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;
}
... ... @@ -105,7 +105,6 @@ class DeleteProductCategory extends Command
foreach ($productList['list'] as $v){
$categoryRelatedModel = new CategoryRelated();
if(empty($v['category_id'])){
echo json_encode($v);
$categoryRelatedModel->del(['product_id'=>$v['id']]);
continue;
}
... ...