From 98fb4d087cfb43f9be62c5908123a99147f3d409 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Thu, 6 Jun 2024 11:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8E=B0=E9=87=91=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lists/order/StoreRefundOrderLists.php | 2 +- app/common/logic/CashFlowLogic.php | 19 +++++++++++++++++++ app/common/logic/PayNotifyLogic.php | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 app/common/logic/CashFlowLogic.php diff --git a/app/common/lists/order/StoreRefundOrderLists.php b/app/common/lists/order/StoreRefundOrderLists.php index f5410f87..bfe2be0f 100644 --- a/app/common/lists/order/StoreRefundOrderLists.php +++ b/app/common/lists/order/StoreRefundOrderLists.php @@ -53,7 +53,7 @@ class StoreRefundOrderLists extends BaseAdminDataLists implements ListsSearchInt } $query->whereTime('refund_reason_time', '<=', $this->params['end_time']); }) - ->field(['id', 'store_id', 'staff_id', 'order_id', 'pay_price', 'pay_time', 'pay_type', 'status', 'uid', 'refund_status', 'refund_type', 'refund_reason_wap', 'refund_reason_time', 'refund_reason_wap_explain', 'refund_reason_wap_img']) + ->field(['id', 'store_id', 'staff_id', 'order_id', 'pay_price', 'pay_time', 'pay_type', 'status', 'uid', 'refund_status', 'refund_type', 'refund_reason_wap', 'refund_reason_time', 'refund_reason_wap_explain', 'refund_reason_wap_img', 'refund_reason']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($item) { diff --git a/app/common/logic/CashFlowLogic.php b/app/common/logic/CashFlowLogic.php new file mode 100644 index 00000000..9a1d0600 --- /dev/null +++ b/app/common/logic/CashFlowLogic.php @@ -0,0 +1,19 @@ +store_id = $storeId; + $model->cash_price = $amount; + $model->receivable = $amount; + $model->save(); + } + +} diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index b982eefe..07d2ffc8 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -158,6 +158,8 @@ class PayNotifyLogic extends BaseLogic if (!$order->save()) { throw new \Exception('订单保存出错'); } + $cashFlowLogic = new CashFlowLogic(); + $cashFlowLogic->insert($order['store_id'], $order['pay_price']); } /**