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),