Merge branch 'feature/group_type' of 47.111.118.107:wmtx/platform into feature/group_type

master
chenzhi 5 years ago
commit 72405e45f5

@ -771,8 +771,12 @@ class GameController extends ThinkController
if($data['data_id']==0 || $data['data_id']==""){ //查询初始分成比例信息 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(); $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_type']=='initial'){ //CP初始分成比例
if($data['data_id']>0){ //修改初始CP分成比例 if($data['data_id']>0){ //修改初始CP分成比例
$where = array(); $where = array();
$where['is_del'] = "0"; $where['is_del'] = "0";
@ -795,6 +799,10 @@ class GameController extends ThinkController
} }
} }
}else{ //CP阶梯分成档位 }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) { //修改阶梯分成 if($data['data_id']>0) { //修改阶梯分成
$where = array(); $where = array();
$where['game_id']= $data['game_id']; $where['game_id']= $data['game_id'];

Loading…
Cancel
Save