|
|
|
@ -252,6 +252,36 @@ class ServerNoticeController extends ThinkController {
|
|
|
|
|
$this->error($msg.'失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/***
|
|
|
|
|
* 获取区服列表
|
|
|
|
|
*/
|
|
|
|
|
public function getGameServer()
|
|
|
|
|
{
|
|
|
|
|
$game_name = $_REQUEST['game_name'];
|
|
|
|
|
$sdk_version = $_REQUEST['sdk_version'];
|
|
|
|
|
$game_map = [];
|
|
|
|
|
if ($game_name) {
|
|
|
|
|
$game_map['relation_game_name'] = $game_name;
|
|
|
|
|
}else {
|
|
|
|
|
$this->AjaxReturn([]);
|
|
|
|
|
}
|
|
|
|
|
if ($sdk_version) {
|
|
|
|
|
$map['server_version'] = $game_map['sdk_version'] = $sdk_version;
|
|
|
|
|
}else {
|
|
|
|
|
$this->AjaxReturn([]);
|
|
|
|
|
}
|
|
|
|
|
$game = M("Game", 'tab_')->where($game_map)->getField('id', true);
|
|
|
|
|
|
|
|
|
|
// 获取版本信息
|
|
|
|
|
$map = [];
|
|
|
|
|
if ($game) {
|
|
|
|
|
$map['game_id'] = ['in', $game];
|
|
|
|
|
} else {
|
|
|
|
|
$map['game_id'] = ['in', [-1]];
|
|
|
|
|
}
|
|
|
|
|
$data = M('ServerNotice', 'tab_')->field('id, server_name, server_id')->where($map)->group('server_name')->select();
|
|
|
|
|
$this->AjaxReturn($data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|