diff --git a/app/listener/paySuccessOrder.php b/app/listener/paySuccessOrder.php index 180f07f7..7b6ec063 100644 --- a/app/listener/paySuccessOrder.php +++ b/app/listener/paySuccessOrder.php @@ -47,12 +47,16 @@ class paySuccessOrder $this->totalAmount = bcmul($realPrice, (string)$commission_rate, 2); $this->remain = $this->totalAmount; + $typeTownServerId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownServer'])->value('mer_type_id'); + $typeVillageServerId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeVillageServer'])->value('mer_type_id'); + $typeTeamServerId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTeamServer'])->value('mer_type_id'); + //镇团队佣金 - $this->calculate(Merchant::TypeTownServer, 'commission_to_town_rate'); + $this->calculate($typeTownServerId, 'commission_to_town_rate'); //村团队佣金 - $this->calculate(Merchant::TypeVillageServer, 'commission_to_village_rate'); + $this->calculate($typeVillageServerId, 'commission_to_village_rate'); //小组服务团队佣金 - $this->calculate(Merchant::TypeTeamServer, 'commission_to_service_team_rate'); + $this->calculate($typeTeamServerId, 'commission_to_service_team_rate'); //订单购物详情表是否有云仓数据 $orderProduct = Db::name('store_order_product')