mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
2911680eaf
commit
dc37499df9
@ -54,14 +54,14 @@ class OrderController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
private function isExistNotPayOrder (Request $request) {
|
||||
private function isExistNotPayOrderByUserId ($userId) {
|
||||
return Order::where('status', 1)
|
||||
->where('user_id', $request->session()->get('id'))
|
||||
->where('user_id', $userId)
|
||||
->first();
|
||||
}
|
||||
|
||||
public function save (OrderSave $request) {
|
||||
if ($this->isExistNotPayOrder()) {
|
||||
if ($this->isExistNotPayOrderByUserId($request->session()->get('id'))) {
|
||||
abort(500, '存在未付款订单,请取消后再试');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user