From eb114b33b354cbc2d5d881ddf7f18d5cfd0a3052 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Thu, 9 Jan 2020 16:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=88=86=E6=88=90=E6=AF=94?= =?UTF-8?q?=E4=BE=8B=E8=AE=BE=E5=AE=9A=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/GameController.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 0e6fe84f4..6531fbd53 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -771,8 +771,12 @@ class GameController extends ThinkController if($data['data_id']==0 || $data['data_id']==""){ //查询初始分成比例信息 $initial_info = M('cp_game_ratio', 'tab_')->where("game_id=%d and begin_total_amount=0 and is_del=0",$data['game_id'])->find(); } + if(!is_numeric($data['game_ratio']) || $data['game_ratio']<0 || $data['game_ratio']>100){ + die(json_encode(array("result"=>"0","desc"=>"分成比例为0~100之间"))); + } if($data['data_type']=='initial'){ //CP初始分成比例 + if($data['data_id']>0){ //修改初始CP分成比例 $where = array(); $where['is_del'] = "0"; @@ -795,6 +799,10 @@ class GameController extends ThinkController } } }else{ //CP阶梯分成档位 + if(!is_numeric($data['total_amount']) || $data['total_amount']<=0){ + die(json_encode(array("result"=>"0","desc"=>"流水金额应大于0"))); + } + if($data['data_id']>0) { //修改阶梯分成 $where = array(); $where['game_id']= $data['game_id'];