解决冲突

master
zhanglingsheng 5 years ago
commit 31af192402

@ -552,11 +552,11 @@ function getGameByName($game_name=null, $sdk_version=null)
if ($sdk_version) {
$map['sdk_version'] = $sdk_version;
}
$result = D("Game")->where($map)->select();
if(empty($result))
{
$result = D("Game")->field('id')->where($map)->select();
if(empty($result)) {
return [['id' => -1]];
}else{
}else
{
return $result;
}
}

@ -96,6 +96,17 @@ class AjaxController extends ThinkController{
$this->AjaxReturn($data);
}
public function getGameVersion($game_name="")
{
if ($game_name) {
$map['relation_game_name'] = $game_name;
}else {
$this->AjaxReturn([]);
}
$data = M('Game','tab_')->field('sdk_version')->where($map)->select();
$this->AjaxReturn($data);
}
/**
* 获取游戏折扣
* @param $game_id

@ -68,8 +68,6 @@
<div class="input-list input-list-game search_label_rehab">
<select id="sdk_version" name="sdk_version" class="select_gallery" >
<option value="">设备类型</option>
<option value="1" <?php echo I('sdk_version') == 1 ? "selected" : ''?>>安卓</option>
<option value="2" <?php echo I('sdk_version') == 2 ? "selected" : ''?>>苹果</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
@ -429,7 +427,27 @@
});
$("#promote_level").change();
var game_server = "{:I('server_name')}";
var game_server = "{:I('game_version')}";
var sdk_version = "{:I('sdk_version')}";
$("#game_name").change(function(){
$.ajax({
url:"{:U('Ajax/getGameVersion')}",
type:"post",
data:{game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择设备</option>";
for (var i in data){
var version_name = data[i].sdk_version == "1" ? '安卓' : '苹果'
str += "<option value='"+data[i].sdk_version+"' "+(data[i].sdk_version == sdk_version?'selected':'')+">"+version_name+"</option>"
}
$("#sdk_version").empty();
$("#sdk_version").append(str);
$("#sdk_version").select2();
}
})
});
$("#sdk_version").change(function(){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",

@ -1897,13 +1897,16 @@ class DownloadController extends BaseController {
foreach($data as $key => $v) {
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find();
$serverId = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find();
$v['promote_id']= $promoteInfo['nickname'];
$csvData['extend'] = $this->encryption($v['extend']);
$csvData['create_time'] = $v['create_time'];
$csvData['user_account'] = $v['user_account'];
$csvData['game_name'] = $v['game_name'];
$csvData['promote_id'] = $v['promote_id'];
$csvData['server_name'] = $v['server_name'];
$csvData['server_name'] = $serverInfo['server_name'];
$csvData['user_id'] = $v['game_player_id'];
$csvData['game_player_name'] = $v['game_player_name'];
$csvData['price'] = $v['price'];

@ -22,7 +22,7 @@ class PlayersController extends BaseController {
$userId = trim(I('user_id', ''));
$extend = trim(I('extend', '')); //cp订单号
$begTime = strtotime(I('begtime'));
$endTime = strtotime(I('endtime')) + 24*3600;
$endTime = strtotime(I('endtime'));
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
// $loginPromote = $this->getLoginPromote();
@ -60,11 +60,11 @@ class PlayersController extends BaseController {
$map['tab_pay_info.game_player_id'] = $userId;
}
if (!empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime - 1]];
$map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime + 24*3600 - 1]];
}else if (empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['elt',$endTime];
$map['tab_pay_info.create_time'] = ['elt',$endTime + 24*3600];
}else if (!empty($begTime) && empty($endTime)) {
$map['tab_pay_info.create_time'] = ['EGT',$begTime];
$map['tab_pay_info.create_time'] = ['EGT',$begTime + 24*3600];
}
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
@ -73,8 +73,12 @@ class PlayersController extends BaseController {
foreach($rs as $key => $v) {
$rs[$key]['extend'] = encryption($v['extend']);
$rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find();
$rs[$key]['promote_id']= $promoteInfo['nickname'];
$promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find();
$serverId = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find();
$rs[$key]['server_name'] = $serverInfo['server_name'];
$rs[$key]['promote_id']= $promoteInfo['account'];
}
$count = M('pay_info', 'tab_')
->field('tab_pay_info.id')

Loading…
Cancel
Save