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

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

@@ -44,12 +44,13 @@ class ServiceOrderLogic extends BaseLogic
 
             //根据服务工单计算当前订单应支付金额
             $order_total = $goods['service_total'];
-            if($goods['goods_payment_type'] = GoodsEnum::ISGOODS_PAYMENT_TYPE){
+            if($goods['goods_payment_type'] == GoodsEnum::ISGOODS_PAYMENT_TYPE){
                 //一口价订单
                 $order_amount = $goods['service_fee'];
                 $pay_status = PayEnum::UNPAID;
                 $work_pay_status = WorkEnum::UN_PAY_STATUS;
             }else{
+                $order_total = $goods['base_service_fee'];
                 $order_amount = $goods['base_service_fee'];
                 $pay_status = !empty($order_amount)?PayEnum::UNPAID:PayEnum::ISPAID;
                 $work_pay_status = !empty($order_amount)?WorkEnum::UN_PAY_STATUS:WorkEnum::IS_PAY_STATUS;

+ 1 - 0
app/common/enum/GoodsEnum.php

@@ -8,6 +8,7 @@ class GoodsEnum
 {
 
     //服务支付类别
+    //预支付
     const UNGOODS_PAYMENT_TYPE = 1;
     const ISGOODS_PAYMENT_TYPE = 2;
 }