Browse Source

fix bug: itemTotalAmount 传递数据是错的

shizhongqi 7 months ago
parent
commit
1903929ce5

+ 2 - 2
app-mall/controllers/OrderController.php

@@ -393,7 +393,7 @@ class OrderController extends BaseController
                         'order' => [
                             'orderSn' => $orderSn,
                             'goodsType' => 1, //商品类型:0花束 1花材
-                            'itemTotalAmount' => $post['itemTotalAmount'] ?? 0,
+                            'itemTotalAmount' => $totalNum,
                             'remark' => $post['remark'] ?? '',
                         ],
                         'mainId' => $this->mainId,
@@ -408,7 +408,7 @@ class OrderController extends BaseController
 
                 $post['sendCost'] = $sendCost;
                 $post['sendDistance'] = $distance;
-                noticeUtil::push("零售订单,获取运费:{$sendCost} 重量:{$totalWeight} 距离:{$distance} 姓名:{$customName} 手机号 {$customMobile} 经纬 {$originalLng} {$originalLat} 金额:{$modifyPrice} 数量:{$totalNum}", '15280215347');
+                noticeUtil::push("零售订单,获取运费:{$sendCost} 重量:{$totalWeight} 距离:{$distance}m 姓名:{$customName} 手机号 {$customMobile} 经纬 {$originalLng} {$originalLat} 金额:{$modifyPrice} 数量:{$totalNum}", '15280215347');
                 $modifyPrice = bcadd($modifyPrice, $sendCost, 2);
             }
 

+ 2 - 6
common/components/delivery/util/DeliveryQuoteUtil.php

@@ -232,13 +232,9 @@ class DeliveryQuoteUtil
                         $rulePrice = $rule['price'] ?? 0;
                         $ruleDistance = ($rule['distance'] ?? 0) * 1000;
 
-                        if ($productCount >= $ruleNum
-                            && $itemTotalAmount >= $rulePrice
-                            && $sendDistance <= $ruleDistance
-                        ) {
+                        if ($productCount >= $ruleNum && $itemTotalAmount >= $rulePrice && $sendDistance <= $ruleDistance) {
                             noticeUtil::push(
-                                "ghsMainId={$ghsMainId}, orderSn={$orderSn}, 免跑腿费,满足条件:"
-                                . json_encode($rule)
+                                "ghsMainId={$ghsMainId}, orderSn={$orderSn}, 免跑腿费,满足条件:" . json_encode($rule)
                             );
                             return 0;
                         }