Merge remote-tracking branch 'origin/feature/admin_optimize' into feature/admin_optimize

master
zyx 5 years ago
commit b0c225591f

@ -83,7 +83,7 @@ class StatementController extends ThinkController
$CompanyId = $_REQUEST['company_id']; //对账公司id $CompanyId = $_REQUEST['company_id']; //对账公司id
$statement_type = $_REQUEST['statement_type']; $statement_type = $_REQUEST['statement_type'];
$is_month = false;//是否是月结判断 $is_month = false;//是否是月结判断,非月结无需梯度计算
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
//判断是否是月结 //判断是否是月结
$tm = explode('-',$_REQUEST['time_start']); $tm = explode('-',$_REQUEST['time_start']);
@ -154,15 +154,16 @@ class StatementController extends ThinkController
"game_id"=>$v['game_id'], "game_id"=>$v['game_id'],
"begin_total_amount"=>0, "begin_total_amount"=>0,
); );
if($is_month){ // if($is_month){
$map['begin_total_amount'] = array("ELT",$v['pay_amount']); // $map['begin_total_amount'] = array("ELT",$v['pay_amount']);
}; // };
$ratiores = $CpGameRatio->where($map)->order("begin_total_amount desc")->limit(1)->select(); // $ratiores = $CpGameRatio->where($map)->order("begin_total_amount desc")->limit(1)->select();
if(empty($ratiores)){ // if(empty($ratiores)){
$redio = 0; // $redio = 0;
}else{ // }else{
$redio = $ratiores[0]['ratio']; // $redio = $ratiores[0]['ratio'];
} // }
$redio = getGameCpRadio($v['game_id'],$v['pay_amount'],$is_month);//获取分成比例
$v['second_ratio'] = $redio; $v['second_ratio'] = $redio;
$v['first_ratio'] = (100-$redio); $v['first_ratio'] = (100-$redio);
if($statement_type == 0){ if($statement_type == 0){

Loading…
Cancel
Save