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']); } /**