Browse Source

订单金额

shish 4 years ago
parent
commit
6ade32fe3e

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

@@ -589,6 +589,7 @@ class GoodsClass extends BaseClass
             $orderSn = $params['orderSn'] ?? '';
             $orderId = $params['orderId'] ?? 0;
             $shopId = $params['shopId'] ?? 0;
+            $orderPrice = $params['orderPrice'] ?? 0;
             $hasReachTime = 0;
             $reachPeriod = 0;
             $reachDate = '0000-00-00';
@@ -622,6 +623,7 @@ class GoodsClass extends BaseClass
                 'staffName' => $staffName,
                 'staffId' => $staffId,
                 'bookName' => $bookName,
+                'orderPrice' => $orderPrice,
             ];
             $main = MainClass::getById($mainId, true);
             if (empty($main)) {

+ 0 - 1
biz-hd/order/services/OrderService.php

@@ -153,7 +153,6 @@ class OrderService extends BaseService
                     'price' => bcmul($unitPrice, $num, 2),
                     'mainId' => $mainId,
                 ];
-                //库存变化在这里
                 OrderGoodsClass::addData($currentGoodsData);
                 $groupGoodsData[] = ['goodsId' => $currentId,'num' => $num,'name' => $name,'unitPrice' => $unitPrice];
             }

+ 2 - 0
biz-hd/work/classes/WorkClass.php

@@ -96,6 +96,7 @@ class WorkClass extends BaseClass
         $bookName = $data['bookName'] ?? '';
         $staffName = $data['staffName'] ?? '';
         $staffId = $data['staffId'] ?? 0;
+        $orderPrice = $data['orderPrice'] ?? 0;
 
         $ids = array_column($goods, 'productId');
         $info = GoodsClass::getByIds($ids, null, 'id');
@@ -155,6 +156,7 @@ class WorkClass extends BaseClass
                 'bookName' => $bookName,
                 'staffName' => $staffName,
                 'staffId' => $staffId,
+                'orderPrice' => $orderPrice,
             ];
             self::createFinish($current, $main);
         }

+ 2 - 1
biz-mall/order/classes/OrderGoodsClass.php

@@ -29,7 +29,8 @@ class OrderGoodsClass extends BaseClass
 
                 $goodsId = $goods->goodsId ?? 0;
                 $num = $goods->num ?? 0;
-                $params = ['orderId' => $orderId, 'orderSn' => $orderSn, 'shopId' => $shopId];
+                $orderPrice = $order->orderPrice ?? 0;
+                $params = ['orderId' => $orderId, 'orderSn' => $orderSn, 'shopId' => $shopId, 'orderPrice' => $orderPrice];
                 $flower = $goods->flower ?? 0;
                 //鲜花类不需要验证库存,库存可以负数,并相应生成制作单
                 $checkStock = $flower == 0 ? true : false;