Merge branch 'hotfix/statement_ratio_change' of wmtx/platform into master

优化上游比例获取
master
廖金灵 4 years ago committed by Gogs
commit 49365c790d

@ -2121,10 +2121,10 @@ function getPromoteCompanyList() {
//获取游戏cp分成比例 $type=false时返回最低分成比例 //获取游戏cp分成比例 $type=false时返回最低分成比例
function getGameCpRadio($game_id,$amount,$type) { function getGameCpRadio($game_id,$amount,$type) {
if (!$type) { if (!$type) {
$data = M('cp_game_ratio','tab_')->where(['game_id'=>$game_id])->order('begin_total_amount asc')->find(); $data = M('cp_game_ratio','tab_')->where(['game_id'=>$game_id,'is_del'=>0])->order('begin_total_amount asc')->find();
} else { } else {
//取两条 //取两条
$ladderData = M('cp_game_ratio','tab_')->where(['game_id'=>$game_id,'begin_total_amount'=>['elt',$amount]])->limit(0,2)->order('begin_total_amount desc')->select(); $ladderData = M('cp_game_ratio','tab_')->where(['game_id'=>$game_id,'begin_total_amount'=>['elt',$amount],'is_del'=>0])->limit(0,2)->order('begin_total_amount desc')->select();
// dump($ladderData);die(); // dump($ladderData);die();
@ -2141,7 +2141,6 @@ function getGameCpRadio($game_id,$amount,$type) {
} }
} }
return $data['ratio']?$data['ratio']:0; return $data['ratio']?$data['ratio']:0;
} }

@ -323,7 +323,6 @@ class CompanyStatementSetController extends Controller {
if($tratio <= 0){continue;} if($tratio <= 0){continue;}
} }
} }
if($v['first_company_type'] == 1){ if($v['first_company_type'] == 1){
$game['first_ratio']=$tratio; $game['first_ratio']=$tratio;
$game['second_ratio']=100-$tratio; $game['second_ratio']=100-$tratio;
@ -767,7 +766,7 @@ class CompanyStatementSetController extends Controller {
$spenMap['s.promote_id']=["in",$pres['ids']]; $spenMap['s.promote_id']=["in",$pres['ids']];
//获取支付记录 //获取支付记录
$list = $Spend->alias('s')->field('sum(s.pay_amount) pay_amount,s.game_id,g.relation_game_id,g.relation_game_name game_name')->where($spenMap)->group('game_id') $list = $Spend->alias('s')->field('sum(s.pay_amount) pay_amount,s.game_id,g.relation_game_id,g.relation_game_name game_name')->where($spenMap)->group('game_id')
->join("tab_game g on s.game_id = g.id") ->join("left join tab_game g on s.game_id = g.id")
->select(); ->select();
if(empty($list)){continue;} if(empty($list)){continue;}
foreach($list as $k=>$v){ foreach($list as $k=>$v){

@ -267,7 +267,7 @@ class PromoteCompanyController extends ThinkController
$v['verify_log'] = json_decode($v['verify_log'], true); $v['verify_log'] = json_decode($v['verify_log'], true);
$v["create"]= "{$v['verify_log']['create_user']} <br> {$v['verify_log']['create_time']}"; $v["create"]= "{$v['verify_log']['create_user']} <br> {$v['verify_log']['create_time']}";
if(isset($v['verify_log']['market_user'])){ if(isset($v['verify_log']['market_user'])){
if($v['status'] == -1){ if($v['verify_status'] == -1){
$ts = "审核拒绝"; $ts = "审核拒绝";
}else{ }else{
$ts = "审核通过"; $ts = "审核通过";
@ -278,7 +278,7 @@ class PromoteCompanyController extends ThinkController
} }
if(isset($v['verify_log']['admin_user'])){ if(isset($v['verify_log']['admin_user'])){
if($v['status'] == -2){ if($v['verify_status'] == -2){
$ts = "审核拒绝"; $ts = "审核拒绝";
}else{ }else{
$ts = "审核通过"; $ts = "审核通过";

Loading…
Cancel
Save