|
|
@@ -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);
|