feat: add multiple hooks, pligun schedule support ,add hook:list artisan command

This commit is contained in:
xboard
2025-07-21 13:29:17 +08:00
parent 768e14bdb9
commit c9bab8fb02
16 changed files with 271 additions and 75 deletions
+2
View File
@@ -304,6 +304,7 @@ class OrderService
public function cancel(): bool
{
$order = $this->order;
HookManager::call('order.cancel.before', $order);
try {
DB::beginTransaction();
$order->status = Order::STATUS_CANCELLED;
@@ -317,6 +318,7 @@ class OrderService
}
}
DB::commit();
HookManager::call('order.cancel.after', $order);
return true;
} catch (\Exception $e) {
DB::rollBack();