diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 7b558b442..6aebd9452 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2040,5 +2040,18 @@ function getPromoteCompanyList() { } +function getGameCpRadio($game_id,$amount,$type) { + + + if (!$type) { + $data = M('cp_game_ratio','tab_')->where(['game_id'=>$game_id])->find(); + } else { + $data = M('cp_game_ratio','tab_')->where(['game_id'=>$game_id,'begin_total_amount'=>['elt',$amount]])->order('begin_total_amount desc')->find(); + + } + + return $data['ratio']; + +} ?>