From 3e6abe5957a0763aa3343763e5e00e64380fa8f0 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 2 Aug 2024 16:27:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B5=84=E9=87=91?= =?UTF-8?q?=E6=B5=81=E5=8A=A8=E9=80=BB=E8=BE=91=E4=BB=A5=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=95=86=E5=BA=97=E8=B4=A2=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/StoreFinanceFlowLogic.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/common/logic/StoreFinanceFlowLogic.php b/app/common/logic/StoreFinanceFlowLogic.php index a845c7ed..5692b929 100644 --- a/app/common/logic/StoreFinanceFlowLogic.php +++ b/app/common/logic/StoreFinanceFlowLogic.php @@ -148,16 +148,21 @@ class StoreFinanceFlowLogic extends BaseLogic { StoreFinanceFlow::where(['order_id' => $order_id, 'financial_type' => 11])->update(['status' => 1]); StoreFinanceFlow::where(['order_id' => $order_id, 'financial_type' => 2])->update(['status' => 1]); + $store=SystemStore::where('id',$store_id)->find(); + $capitalFlowDao = new CapitalFlowLogic($store); if ($money > 0) { + $capitalFlowDao->storeIncome('store_money_add', 'order', $order_id, $money); SystemStore::where('id', $store_id)->inc('store_money', $money)->update(); } if ($deposit > 0) { + $capitalFlowDao->storeIncome('store_paid_deposit_add', 'order', $order_id, $money); SystemStore::where('id', $store_id)->inc('paid_deposit', $deposit)->update(); } $find = StoreFinanceFlow::where(['order_id' => $order_id, 'financial_pm' => 1, 'financial_type' => 16, 'status' => 0])->find(); StoreFinanceFlow::where(['order_id' => $order_id, 'financial_type' => 16])->update(['status' => 1]); if ($find) { if ($find['number'] > 0) { + $capitalFlowDao->storeIncome('store_attrition_add', 'order', $order_id, $money); SystemStore::where('id', $store_id)->inc('attrition', $find['number'])->update(); } }