Browse Source

销售价

shish 4 years ago
parent
commit
47ab37d398
1 changed files with 3 additions and 0 deletions
  1. 3 0
      biz-hd/goods/classes/GoodsClass.php

+ 3 - 0
biz-hd/goods/classes/GoodsClass.php

@@ -100,6 +100,9 @@ class GoodsClass extends BaseClass
             $totalNum = bcadd($num, $totalNum);
             $cgPrice = $postGoods['price'] ?? 0;
             $salePrice = $postGoods['salePrice'] ?? 0;
+            if (empty($salePrice)) {
+                $salePrice = $goodsInfo[$goodsId]['price'] ?? 0;
+            }
             $totalPrice = bcmul($cgPrice, $num, 2);
             $addCgItem = [
                 'orderSn' => $orderSn,