瀏覽代碼

订单总价修改

whitefang 2 年之前
父節點
當前提交
2e7aa90f57
共有 2 個文件被更改,包括 9 次插入 和 2 次删除
  1. 8 1
      app/api/controller/UserCouponController.php
  2. 1 1
      app/api/logic/ServiceOrderLogic.php

+ 8 - 1
app/api/controller/UserCouponController.php

@@ -42,7 +42,10 @@ class UserCouponController extends BaseApiController
         }
     }
 
-
+    /**
+     * 商品可领取优惠券列表
+     * @return \think\response\Json
+     */
     public function categoryCouponLists()
     {
         $params = (new UserCouponValidate())->goCheck('category',[
@@ -55,6 +58,10 @@ class UserCouponController extends BaseApiController
         return $this->data($result);
     }
 
+    /**
+     * 订单可用优惠券
+     * @return \think\response\Json
+     */
     public function categoryWithAmountLists()
     {
         $params = (new UserCouponValidate())->goCheck('categoryWithAmountList',[

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

@@ -43,9 +43,9 @@ class ServiceOrderLogic extends BaseLogic
             }
 
             //根据服务工单计算当前订单应支付金额
-            $order_total = $goods['service_total'];
             if($goods['goods_payment_type'] == GoodsEnum::ISGOODS_PAYMENT_TYPE){
                 //一口价订单
+                $order_total = $goods['service_fee'];
                 $order_amount = $goods['service_fee'];
             }else{
                 $order_total = $goods['base_service_fee'];