feat: 牛牛单独限红 - 新增limit_low_nn/limit_high_nn字段,代理端添加/编辑代理和会员支持牛牛限红设置,语言包三语支持

This commit is contained in:
li
2026-02-11 19:53:50 +08:00
parent 1ce6c3d780
commit 71d7ff1d7b
36 changed files with 2590 additions and 18 deletions
+36
View File
@@ -253,6 +253,8 @@ class Agent Extends Common{
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
$agent_ximalv = round(Request::instance()->post('agent_ximalv'),2);
$agent_ximalv_dt = round(Request::instance()->post('agent_ximalv_dt'),2);
$agent_ximalv_nn = round(Request::instance()->post('agent_ximalv_nn'),2);
@@ -327,6 +329,15 @@ class Agent Extends Common{
if($limit_low_pair > $limit_high_pair && $limit_low_pair > 0 && $limit_high_pair > 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_pair_limit_bigger_than_max_tie_limit']]));
}
if($limit_low_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
}
if($limit_high_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
}
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
}
if($limit_low < $agentParent['limit_low'] || $limit_low > $agentParent['limit_high'] || $limit_high < $agentParent['limit_low'] || $limit_high > $agentParent['limit_high']){
die(json_encode(['code'=>0,'msg'=>$lang['limit_cannot_bigger'].' '.$agentParent['limit_low'].'-'.$agentParent['limit_high']]));
}
@@ -336,6 +347,11 @@ class Agent Extends Common{
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair']]));
}
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
}
}
if($agent_ximalv < 0){
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_limit_0']]));
}
@@ -395,6 +411,8 @@ class Agent Extends Common{
$user_data['limit_high_tie'] = $limit_high_tie;
$user_data['limit_low_pair'] = $limit_low_pair;
$user_data['limit_high_pair'] = $limit_high_pair;
$user_data['limit_low_nn'] = $limit_low_nn;
$user_data['limit_high_nn'] = $limit_high_nn;
$user_data['bet_type'] = $bet_type;
$user_data['reg_time'] = time();
$ip = '0.0.0.0';
@@ -533,6 +551,8 @@ class Agent Extends Common{
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
$agent_ximalv = round(Request::instance()->post('agent_ximalv'),2);
$agent_ximalv_dt = round(Request::instance()->post('agent_ximalv_dt'),2);
$agent_ximalv_nn = round(Request::instance()->post('agent_ximalv_nn'),2);
@@ -594,6 +614,20 @@ class Agent Extends Common{
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair'].'范围']));
}
if($limit_low_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
}
if($limit_high_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
}
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
}
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
}
}
if($agent_ximalv > $agentParent['agent_ximalv']){
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_cannot_bigger_agent'].' '.$agentParent['agent_ximalv'].'!']));
}
@@ -662,6 +696,8 @@ class Agent Extends Common{
$user_data['limit_high_tie'] = $limit_high_tie;
$user_data['limit_low_pair'] = $limit_low_pair;
$user_data['limit_high_pair'] = $limit_high_pair;
$user_data['limit_low_nn'] = $limit_low_nn;
$user_data['limit_high_nn'] = $limit_high_nn;
$user_data['agent_ximalv'] = $agent_ximalv;
$user_data['agent_ximalv_dt'] = $agent_ximalv_dt;
$user_data['agent_ximalv_nn'] = $agent_ximalv_nn;
+37 -1
View File
@@ -281,6 +281,8 @@ class Player Extends Common{
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
$win_limit = round(Request::instance()->post('win_limit'),2);
$agent_commission = round(Request::instance()->post('agent_commission'),2);
$agent_commission_dt = round(Request::instance()->post('agent_commission_dt'),2);
@@ -385,6 +387,20 @@ class Player Extends Common{
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair']]));
}
if($limit_low_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
}
if($limit_high_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
}
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
}
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
}
}
if($agent_ximalv > $agentParent['agent_ximalv']){
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_cannot_bigger_agent'].$agentParent['agent_ximalv'].'!']));
}
@@ -427,6 +443,8 @@ class Player Extends Common{
$user_data['limit_high_tie'] = $limit_high_tie;
$user_data['limit_low_pair'] = $limit_low_pair;
$user_data['limit_high_pair'] = $limit_high_pair;
$user_data['limit_low_nn'] = $limit_low_nn;
$user_data['limit_high_nn'] = $limit_high_nn;
$user_data['price_banker'] = $agentParent['price_banker'];
$user_data['price_player'] = $agentParent['price_player'];
$user_data['price_tie_baccarat'] = $agentParent['price_tie_baccarat'];
@@ -605,6 +623,8 @@ class Player Extends Common{
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
$agent_ximalv = round(Request::instance()->post('agent_ximalv'),2);
$agent_ximalv_dt = round(Request::instance()->post('agent_ximalv_dt'),2);
$agent_ximalv_nn = round(Request::instance()->post('agent_ximalv_nn'),2);
@@ -681,7 +701,21 @@ class Player Extends Common{
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair']]));
}
if($limit_low_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
}
if($limit_high_nn < 0){
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
}
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
}
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
}
}
if($agent_ximalv > $agentParent['agent_ximalv']){
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_cannot_bigger_agent'].$agentParent['agent_ximalv'].'!']));
}
@@ -719,6 +753,8 @@ class Player Extends Common{
$user_data['limit_high_tie'] = $limit_high_tie;
$user_data['limit_low_pair'] = $limit_low_pair;
$user_data['limit_high_pair'] = $limit_high_pair;
$user_data['limit_low_nn'] = $limit_low_nn;
$user_data['limit_high_nn'] = $limit_high_nn;
$user_data['agent_ximalv'] = $agent_ximalv;
$user_data['agent_ximalv_dt'] = $agent_ximalv_dt;
$user_data['agent_ximalv_nn'] = $agent_ximalv_nn;
+3 -3
View File
@@ -35,17 +35,17 @@ class Report Extends Common{
$game_id = intval(Request::instance()->get('game_id'));
$export = intval(Request::instance()->get('export'));
// 转换日期时间
// 转换日期时间(默认:今天07:00:00 ~ 明天06:59:59)
if ($startDate) {
$startTime = strtotime($startDate);
} else {
$startTime = strtotime(date('Y-m-d'));
$startTime = strtotime(date('Y-m-d') . ' 07:00:00');
$get['startDate'] = date('Y-m-d H:i:s', $startTime);
}
if ($endDate) {
$endTime = strtotime($endDate);
} else {
$endTime = time();
$endTime = strtotime(date('Y-m-d', strtotime('+1 day')) . ' 06:59:59');
$get['endDate'] = date('Y-m-d H:i:s', $endTime);
}