From 1e6b21378d4f9ca399e292697c448a68e8857f62 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Thu, 1 Feb 2024 13:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0=E8=B4=A2?= =?UTF-8?q?=E5=8A=A1=E8=B4=A6=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../merchant/FinancialRecordRepository.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/common/repositories/system/merchant/FinancialRecordRepository.php b/app/common/repositories/system/merchant/FinancialRecordRepository.php index 44923f35..8d098d80 100755 --- a/app/common/repositories/system/merchant/FinancialRecordRepository.php +++ b/app/common/repositories/system/merchant/FinancialRecordRepository.php @@ -144,6 +144,15 @@ class FinancialRecordRepository extends BaseRepository //镇佣金 $town=$this->dao->search($where)->where('financial_type', 'commission_to_town')->sum('number'); $town_refund=$this->dao->search($where)->where('financial_type', 'commission_to_town_refund')->sum('number'); + //直推首单佣金 + $promoter = $this->dao->search($where)->where('financial_type', 'commission_to_promoter')->sum('number'); + $promoterRefund = $this->dao->search($where)->where('financial_type', 'commission_to_promoter_refund')->sum('number'); + //配送员佣金 + $courier = $this->dao->search($where)->where('financial_type', 'commission_to_courier')->sum('number'); + $courierRefund = $this->dao->search($where)->where('financial_type', 'commission_to_courier_refund')->sum('number'); + //提货店铺佣金 + $store = $this->dao->search($where)->where('financial_type', 'commission_to_store')->sum('number'); + $storeRefund = $this->dao->search($where)->where('financial_type', 'commission_to_store_refund')->sum('number'); //平台手续费 $charge_ = $this->dao->search($where)->where('financial_type', 'in', ['order_charge', 'presell_charge'])->sum('number'); $_charge = $this->dao->search($where)->where('financial_type', 'refund_charge')->sum('number'); @@ -241,6 +250,21 @@ class FinancialRecordRepository extends BaseRepository 'count' => bcsub($town,$town_refund,2), 'field' => '元', 'name' => '镇佣金' + ],[ + 'className' => 'el-icon-s-order', + 'count' => bcsub($promoter, $promoterRefund, 2), + 'field' => '元', + 'name' => '直推首单佣金' + ],[ + 'className' => 'el-icon-s-order', + 'count' => bcsub($courier, $courierRefund, 2), + 'field' => '元', + 'name' => '配送员佣金' + ],[ + 'className' => 'el-icon-s-order', + 'count' => bcsub($store, $storeRefund, 2), + 'field' => '元', + 'name' => '提货店铺佣金' ],[ 'className' => 'el-icon-s-order', 'count' =>bcsub($charge, bcadd(bcadd(bcadd($entry_merchant, $cloud_warehouse, 2), $service_team, 2), $village, 2), 2),