diff --git a/app/Service/v3/Implementations/OrderListService.php b/app/Service/v3/Implementations/OrderListService.php index 9c576a9..4baac01 100644 --- a/app/Service/v3/Implementations/OrderListService.php +++ b/app/Service/v3/Implementations/OrderListService.php @@ -197,7 +197,7 @@ class OrderListService implements OrderListServiceInterface public function autoCancel($userId) { return OrderMain::query() - ->where(['user_id' => $userId]) + ->where(['user_id' => $userId, 'state' => OrderState::UNPAID]) ->where('created_at', '<', time()-900) ->update(['state' => OrderState::CANCELED]); }