diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 19de23562..9d1972f58 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2322,7 +2322,7 @@ function getrelationGameName($id) { * game_id=>游戏id, */ -function getAvailableBalance($promote_id=0,$game_id=0,$server_id=0) { +function getAvailableBalance($promote_id=0,$game_id=0,$server_id='') { if (!$promote_id||!$game_id||!$server_id) { return 0; @@ -2330,7 +2330,7 @@ function getAvailableBalance($promote_id=0,$game_id=0,$server_id=0) { $availableBalanceData = M('promote_game_available_balance','tab_') ->field('available_balance') - ->where(['promote_id'=>$promote_id,'game_id'=>$game_id,'server_id'=>$server_id]) + ->where(['promote_id'=>$promote_id,'game_id'=>$game_id,'server_name'=>$server_id]) ->find(); return $availableBalanceData['available_balance']?$availableBalanceData['available_balance']:0; diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index 9b1b564d5..5b3ef3ff3 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -490,7 +490,7 @@ class TestResourceController extends ThinkController } } else {//非新用户 - $availableBalance = getAvailableBalance($data['promote_id'],$data['game_id'],$data['server_id']); + $availableBalance = getAvailableBalance($data['promote_id'],$data['game_id'],$data['server_name']); // var_dump($availableBalance);die(); $promoteAllRecharge = sum_promote_total_money($data['promote_id']);//总充值量 diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php index 6a43b98fc..d4763510c 100644 --- a/Application/Home/Common/function.php +++ b/Application/Home/Common/function.php @@ -1308,7 +1308,7 @@ function recordPromoteLogs($module,$action_type) { * game_id=>游戏id, */ -function getAvailableBalance($promote_id=0,$game_id=0,$server_id=0) { +function getAvailableBalance($promote_id=0,$game_id=0,$server_id='') { if (!$promote_id||!$game_id||!$server_id) { return 0; @@ -1316,7 +1316,7 @@ function getAvailableBalance($promote_id=0,$game_id=0,$server_id=0) { $availableBalanceData = M('promote_game_available_balance','tab_') ->field('available_balance') - ->where(['promote_id'=>$promote_id,'game_id'=>$game_id,'server_id'=>$server_id]) + ->where(['promote_id'=>$promote_id,'game_id'=>$game_id,'server_name'=>$server_id]) ->find(); return $availableBalanceData['available_balance']?$availableBalanceData['available_balance']:0; diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index d3761c02e..76f345a74 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -480,7 +480,7 @@ class TestResourceController extends BaseController } } else {//非新用户 - $availableBalance = getAvailableBalance($data['promote_id'],$data['game_id'],$data['server_id']); + $availableBalance = getAvailableBalance($data['promote_id'],$data['game_id'],$data['server_name']); // var_dump($availableBalance);die(); $promoteAllRecharge = sum_promote_total_money($data['promote_id']);//总充值量 diff --git a/Application/Home/View/default/TestResource/add.html b/Application/Home/View/default/TestResource/add.html index 5f62b414a..c750980d3 100644 --- a/Application/Home/View/default/TestResource/add.html +++ b/Application/Home/View/default/TestResource/add.html @@ -304,11 +304,11 @@ layer.msg('请选择游戏'); return false; } - if (server_id == 0 || server_id == '') { - layer.msg('请选择区服'); - return false; - - } + // if (server_id == 0 || server_id == '') { + // layer.msg('请选择区服'); + // return false; + // + // } var data = $("form").serialize(); var g_game_id = $("#game_id option:selected").attr('game-id');