1
This commit is contained in:
@@ -32,7 +32,7 @@ class CategorieLogic
|
||||
'data' => $data,
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
throw new BusinessException($e->getMessage().'分类创建失败,请稍后重试', 500);
|
||||
throw new BusinessException('分类创建失败,请稍后重试', 500);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,21 @@ class CategorieLogic
|
||||
'data' => $data,
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
throw new BusinessException($e->getMessage().'分类编辑失败,请稍后重试', 500);
|
||||
throw new BusinessException('分类编辑失败,请稍后重试', 500);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(int $id)
|
||||
{
|
||||
try {
|
||||
$categorie = TicketCategorie::where(['id'=>$id])->delete();
|
||||
return $categorie;
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('分类删除失败', [
|
||||
'id' => $id,
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
throw new BusinessException('分类删除失败,请稍后重试', 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user