This commit is contained in:
Edward Yang 2022-08-18 16:22:54 +08:00
parent 83bda1760b
commit 8259973dc4
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ class OrderController extends Controller
{
$customer = current_customer();
$order = OrderRepo::getOrderByNumber($number, $customer);
if (empty($order)) {
throw new \Exception('无效的订单');
}
StateMachineService::getInstance($order)->changeStatus(StateMachineService::COMPLETED);
return json_success(trans('shop/account.order_completed'));
}