quguofeng 1 year ago
parent
commit
05a2f2657b

+ 5 - 1
app/common/repositories/store/order/StoreOrderRepository.php

@@ -221,7 +221,11 @@ class StoreOrderRepository extends BaseRepository
             foreach ($groupOrder->orderList as $_k => $order) {
                 //百分比付款的更新订单状态
                 if($order->is_percentage == 1){
-                    $order->status = 4;
+                    if($order->start_percentage > 0){
+                        $order->status = 4;
+                    }else{
+                        $order->status = 0;
+                    }
                 }
                 $order->paid = 1;
                 $order->pay_time = $time;

+ 3 - 1
crmeb/services/SmsService.php

@@ -286,7 +286,9 @@ class SmsService
                 $residue_price = $order->total_price*$order->start_percentage/100;
                 //$residue_price = $order->total_price;
                 $time = $order->expire_time;
-                self::create()->send($order->user_phone, $tempId, compact('residue_price', 'time','order_id'));
+                if($residue_price > 0){
+                    self::create()->send($order->user_phone, $tempId, compact('residue_price', 'time','order_id'));
+                }
                 break;
         }
     }