From c355e918fb5948deba5318a82bb7284fa70bcee2 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Sat, 3 Feb 2024 13:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BE=9B=E5=BA=94=E9=93=BE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/store/consumption/CommissionDao.php | 2 +- .../dao/store/order/StoreOrderOtherDao.php | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/common/dao/store/consumption/CommissionDao.php b/app/common/dao/store/consumption/CommissionDao.php index a243c3f8..18e6f776 100755 --- a/app/common/dao/store/consumption/CommissionDao.php +++ b/app/common/dao/store/consumption/CommissionDao.php @@ -164,7 +164,7 @@ class CommissionDao } // 退佣金和红包、保证金 $financeRecord = FinancialRecord::where('order_id', $refundOrder->order['order_id']) - ->whereIn('financial_type', ['commission_to_store', 'commission_to_courier', 'commission_to_promoter', 'auto_margin']) + ->whereIn('financial_type', ['commission_to_store', 'commission_to_courier', 'commission_to_promoter']) ->field('user_id uid,user_info nickname,number,mer_id,financial_type')->select()->toArray(); if (empty($financeRecord)) { return; diff --git a/app/common/dao/store/order/StoreOrderOtherDao.php b/app/common/dao/store/order/StoreOrderOtherDao.php index 4193c429..2fe9f8b7 100755 --- a/app/common/dao/store/order/StoreOrderOtherDao.php +++ b/app/common/dao/store/order/StoreOrderOtherDao.php @@ -836,15 +836,16 @@ class StoreOrderOtherDao extends BaseDao $financeDao->order->order_id = $model->refund_order_id; $financeDao->platformIn($refundTotal, 'supply_chain_refund', $model->mer_id); - if ($refundOrder->order->status == -1){ - $margin = FinancialRecord::where('order_id', $refundOrder['order_id']) - ->where('mer_id', $model->mer_id) - ->where('financial_type', 'auto_margin') - ->value('number'); - if ($margin) { - $financeDao->platformOut($margin, 'auto_margin_refund', $model->mer_id); - } - } + // TODO 暂时不退保证金 +// if ($refundOrder->order->status == -1){ +// $margin = FinancialRecord::where('order_id', $refundOrder['order_id']) +// ->where('mer_id', $model->mer_id) +// ->where('financial_type', 'auto_margin') +// ->value('number'); +// if ($margin) { +// $financeDao->platformOut($margin, 'auto_margin_refund', $model->mer_id); +// } +// } $financeDao->save(); app()->make(MerchantRepository::class)->subLockMoney($model->mer_id, 'order', $refundOrder['order_id'], $refundTotal);