| xqd
@@ -64,6 +64,10 @@ class OrderController extends AuthController
|
|
|
$payment_amount = $req['total_amount'] - $discount_amount;
|
|
|
$payment_amount = $payment_amount < 0 ? 0 : $payment_amount;
|
|
|
|
|
|
+ if (Order::where('docter_id', $req['docter_id'])->where('product_type', $req['product_type'])->where('user_id', $user['id'])->where('order_status', 1)->exists()) {
|
|
|
+ return out(null, 10013, '您有一笔该医生的未支付订单,请先去支付');
|
|
|
+ }
|
|
|
+
|
|
|
//图文咨询订单未结束时不能针对同一医生再次下图文订单
|
|
|
if ($req['product_type'] == 2 && Order::where('docter_id', $req['docter_id'])->where('product_type', 2)->where('user_id', $user['id'])->whereIn('order_status', [2,3])->exists()) {
|
|
|
return out(null, 10012, '您已经下过该医生的图文订单了,并且订单还未完成');
|