fix order renew

This commit is contained in:
Tokumeikoi 2020-02-11 15:45:30 +08:00
parent 8fafdc9bb5
commit ba40e3a1bf

View File

@ -61,9 +61,9 @@ class OrderController extends Controller
]);
}
private function isExistNotPayOrderByUserId($userId)
private function isNotCompleteOrderByUserId($userId)
{
$order = Order::where('status', 0)
$order = Order::whereIn('status', [0, 1])
->where('user_id', $userId)
->first();
if (!$order) {
@ -74,7 +74,7 @@ class OrderController extends Controller
public function save(OrderSave $request)
{
if ($this->isExistNotPayOrderByUserId($request->session()->get('id'))) {
if ($this->isNotCompleteOrderByUserId($request->session()->get('id'))) {
abort(500, '存在未付款订单,请取消后再试');
}