mirror of
https://github.com/v2board/v2board.git
synced 2025-06-16 06:37:53 +08:00
update: add inventory limit
This commit is contained in:
@ -249,6 +249,11 @@ class OrderService
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$planService = new PlanService($order->plan_id);
|
||||
if (!$planService->incrementInventory()) {
|
||||
DB::rollBack();
|
||||
return false;
|
||||
}
|
||||
DB::commit();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user