From 91585e6ed47b817487ec78fce767f2dd95274396 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 6 Jul 2021 10:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A4=E6=96=AD=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameMarginSetController.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Controller/GameMarginSetController.class.php b/Application/Admin/Controller/GameMarginSetController.class.php index 59a69f13a..1ed16b54f 100644 --- a/Application/Admin/Controller/GameMarginSetController.class.php +++ b/Application/Admin/Controller/GameMarginSetController.class.php @@ -373,14 +373,14 @@ class GameMarginSetController extends Controller { }else{ $ratio = $val['second_ratio']; } - $statement_money = round( $this->adddata[$game]['pay_amount'] * $ratio / 100,2); - $this->adddata[$game]['cp_statement_amount'] = $statement_money; - // $statement_money = round( $this->adddata[$game]['pay_amount'] / $val['pay_amount'] * $val['sum_money'],2); - // if( array_key_exists("cp_statement_amount",$this->adddata[$game]) ){ - // $this->adddata[$game]['cp_statement_amount'] += $statement_money; - // }else{ - // $this->adddata[$game]['cp_statement_amount'] = $statement_money; - // } + + $statement_money = round( $this->adddata[$game]['pay_amount'] / $val['pay_amount'] * $val['sum_money'],2); + if( array_key_exists("cp_statement_amount",$this->adddata[$game]) ){ + $this->adddata[$game]['cp_statement_amount'] += $statement_money; + }else{ + $this->adddata[$game]['cp_statement_amount'] = $statement_money; + } + $this->adddata[$game]['cp_promote_ratio'] = $val['promote_ratio']; $this->adddata[$game]['cp_ratio'] = $ratio; } @@ -393,7 +393,7 @@ class GameMarginSetController extends Controller { { $where = [ "partner_id"=>$company_id, - "_string"=>"original_package_name = '{$OPName}' OR relation_game_name = '{$OPName}'" + "_string"=>"( original_package_name = '{$OPName}' AND select_package_name = 0 ) OR ( relation_game_name = '{$OPName}' AND select_package_name = 1 )" ]; $game = M("Game","tab_")->field("relation_game_name")->where($where)->group("relation_game_name")->select(); if($game){