diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 1133af67..c9eff794 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -18,6 +18,7 @@ use app\common\model\order\Cart; use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_category\StoreCategory; use app\common\model\store_finance_flow\StoreFinanceFlow; +use app\common\model\store_finance_flow_product\StoreFinanceFlowProduct; use app\common\model\store_order\StoreOrder; use app\common\model\store_order_cart_info\StoreOrderCartInfo; use app\common\model\store_product\StoreProduct; @@ -576,11 +577,7 @@ class OrderLogic extends BaseLogic 'staff_id' => $params['staff_id'] ?? 0, ], ['id' => $order['id']]); //修改商品统计记录标识 - (new StoreProductLog())->update( - [ - 'store_id' => $params['store_id'] - ], - ['oid' => $order['id']] + (new StoreProductLog())->update(['store_id' => $params['store_id'],'oid' => $order['id']] ); (new StoreOrderCartInfo())->update([ 'verify_code' => $params['verify_code'] . '-1', @@ -591,6 +588,9 @@ class OrderLogic extends BaseLogic 'update_time' => time(), ], ['oid' => $order['id']]); $financeFlow = new StoreFinanceFlow(); + $financeFlowProduct = new StoreFinanceFlowProduct(); + $financeFlow->where('order_id',$order['id'])->update(['store_id'=>$params['store_id'],'staff_id'=>$params['staff_id'] ?? 0]); + $financeFlowProduct->where('oid',$order['id'])->update(['store_id'=>$params['store_id']]); $financeFlowLogic = new StoreFinanceFlowLogic(); $select_1 = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => ['in' => 14, 15, 16]])->select(); foreach ($select_1 as $k => $v) {