|
|
|
@ -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'];
|
|
|
|
|