diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 3f13d8eec..a3fa8edd9 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -370,6 +370,9 @@ class BeforehandOrderLogic extends BaseLogic if ($count > 0) { throw new BusinessException('订单中有数量为0的商品,请先处理'); } + if($order['uid']>0){ + $user_ship=User::where('id', $order['uid'])->value('user_ship')??0; + } Db::startTrans(); try { $arr = [ @@ -386,6 +389,7 @@ class BeforehandOrderLogic extends BaseLogic $arr['delivery_time'] = strtotime($delivery_time); $res = WarehouseOrder::create($arr); foreach ($info as $key => $arr) { + $price=StoreProductGroupPrice::where('product_id',$arr['product_id'])->where('group_id',$user_ship)->value('price')??0; $data = [ 'warehouse_id' => $warehouse_id, 'product_id' => $arr['product_id'], @@ -398,6 +402,7 @@ class BeforehandOrderLogic extends BaseLogic 'admin_id' => $admin_id, 'total_price' => $arr['total_price'], 'price' => $arr['price'], + 'vip_price' => $price==0?$arr['price']:$price, 'purchase' => $arr['purchase'], 'oid' => $res['id'], 'code' => $res['code'], diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index 681e0699a..905ad4413 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -167,6 +167,7 @@ class WarehouseProductLogic extends BaseLogic 'after_nums' => $after_nums, 'price' => $params['price'] ?? 0, 'purchase' => $params['purchase'] ?? 0, + 'vip_price' => $params['vip_price'] ?? 0, 'total_price' => $params['total_price'] ?? 0, 'admin_id' => $params['admin_id'], 'code' => $params['code'] ?? '',