| xqd
@@ -69,8 +69,8 @@ class OrderController extends AuthController
|
|
|
}
|
|
|
|
|
|
//图文咨询订单未结束时不能针对同一医生再次下图文订单
|
|
|
- if (Order::where('docter_id', $req['docter_id'])->whereIn('order_status', [2,3])->exists()) {
|
|
|
- return out(null, 10012, '您已经下过该医生的单了,并且订单还未完成');
|
|
|
+ if ($req['product_type'] == 2 && Order::where('docter_id', $req['docter_id'])->whereIn('order_status', [2,3])->exists()) {
|
|
|
+ return out(null, 10012, '您已经下过该医生的图文订单了,并且订单还未完成');
|
|
|
}
|
|
|
|
|
|
if ($req['payment_type'] == 2) {
|
| xqd
@@ -506,7 +506,7 @@ class OrderController extends AuthController
|
|
|
if ($payment_amount == 0 || $req['payment_type'] == 2) {
|
|
|
Order::payCompletedHandle($order['id']);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//如果有优惠券就标记优惠券为已使用
|
|
|
if (!empty($req['user_coupon_id'])) {
|
|
|
UserCoupon::where('id', $req['user_coupon_id'])->update(['order_id' => $order['id'], 'status' => 2, 'use_time' => time()]);
|