From 4be5b1ba2c84809dc2fa4846482cd197e564a851 Mon Sep 17 00:00:00 2001 From: zyx Date: Wed, 5 Feb 2020 16:37:33 +0800 Subject: [PATCH] =?UTF-8?q?cp=E5=88=86=E6=88=90=E6=AF=94=E4=BE=8B=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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']; + +} ?>