whitefang 1 год назад
Родитель
Сommit
d5681e3e24
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      app/api/logic/ServiceOrderLogic.php

+ 1 - 3
app/api/logic/ServiceOrderLogic.php

@@ -67,8 +67,7 @@ class ServiceOrderLogic extends BaseLogic
                     ->where('expire_time','>=',time())
                     ->where('begin_use','<',time())
                     ->findOrEmpty();
-                dd($user_coupon,$params);
-                if(empty($user_coupon)){
+                if($user_coupon->isEmpty()){
                    throw new Exception('该优惠券无法使用');
                 }
                 if($goods['goods_payment_type'] == GoodsEnum::ISGOODS_PAYMENT_TYPE and $order_amount<$user_coupon['amount_require']){
@@ -84,7 +83,6 @@ class ServiceOrderLogic extends BaseLogic
                 }else{
                     $order_coupon_amount = $user_coupon['amount'];
                 }
-                dd($user_coupon);
                 $order_amount = ($order_coupon_amount>$user_coupon['max_deductible_price'])?($order_amount-$user_coupon['max_deductible_price']):($order_amount-$order_coupon_amount);
 
                 dd($order_amount);