Browse Source

特价商品下单支付拦截

master
Lemon 5 years ago
parent
commit
e55ffc600d
  1. 2
      app/Controller/PaymentController.php
  2. 2
      app/Service/OrderService.php

2
app/Controller/PaymentController.php

@ -51,7 +51,7 @@ class PaymentController extends BaseController
->get();
//判断是否有购买多个特价商品
$result = $this->purchaseLimitService->PurchaseLimit($orderGoods);
if(!$result){
if($result > 1){
Db::rollBack();
$this->log->event(LogLabel::ORDER_LOG, ['msg'=> '支付失败,同一订单不能存在多个特价商品','global_order_id' => $orderMain->global_order_id]);
return $this->result(ErrorCode::PAY_FAILURE, $data,'同一订单不能存在多个特价商品');

2
app/Service/OrderService.php

@ -308,7 +308,7 @@ class OrderService implements OrderServiceInterface
}
//判断是否有购买多个特价商品
$result = $this->purchaseLimitService->PurchaseLimit($orderGoods);
if($result > 0){
if($result > 1){
Db::rollBack();
return '同一个订单不能购买多个特价商品';
}

Loading…
Cancel
Save