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时返回最低分成比例
function getGameCpRadio($game_id,$amount,$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 {
//取两条
$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();
@ -2141,7 +2141,6 @@ function getGameCpRadio($game_id,$amount,$type) {
}
}
return $data['ratio']?$data['ratio']:0;
}

@ -323,7 +323,6 @@ class CompanyStatementSetController extends Controller {
if($tratio <= 0){continue;}
}
}
if($v['first_company_type'] == 1){
$game['first_ratio']=$tratio;
$game['second_ratio']=100-$tratio;
@ -767,7 +766,7 @@ class CompanyStatementSetController extends Controller {
$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')
->join("tab_game g on s.game_id = g.id")
->join("left join tab_game g on s.game_id = g.id")
->select();
if(empty($list)){continue;}
foreach($list as $k=>$v){

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

Loading…
Cancel
Save