|
@@ -156,8 +156,8 @@ class OrderController extends AuthController
|
|
$payment_amount = $payment_amount < 0 ? 0 : $payment_amount;
|
|
$payment_amount = $payment_amount < 0 ? 0 : $payment_amount;
|
|
|
|
|
|
//疫苗和儿保订单未结束时不能再次下单
|
|
//疫苗和儿保订单未结束时不能再次下单
|
|
- if (in_array($req['product_type'], [4,5]) && Order::whereIn('product_type', [4,5])->where('user_id', $user['id'])->whereIn('order_status', [2,3,7])->exists()) {
|
|
|
|
- return out(null, 10012, '您已经下过'.config('config.product_type_map')[$req['product_type']].'订单,并且订单还未完成');
|
|
|
|
|
|
+ if (in_array($req['product_type'], [4,5]) && Order::whereIn('product_type', [4,5])->where('patient_id', $req['patient_id'])->whereIn('order_status', [2,3,7])->exists()) {
|
|
|
|
+ return out(null, 10012, '该患者已经下过'.config('config.product_type_map')[$req['product_type']].'订单,并且订单还未完成');
|
|
}
|
|
}
|
|
|
|
|
|
//检查号源
|
|
//检查号源
|