Merge branch 'release-1.0.0' of 47.111.118.107:wmtx/platform into release_zyx

master
zhengyongxing 5 years ago
commit b5c06df195

@ -2049,6 +2049,9 @@ class ExportController extends Controller
if (isset($params['order_id'])) {
$map['tab_game_supersign.order_id'] = $params['order_id'];
}
if (isset($params['pay_way'])) {
$map['tab_game_supersign.pay_way'] = $params['pay_way'];
}
if (isset($params['account'])) {
$map['tab_user.account'] = $params['account'];
}
@ -2078,11 +2081,19 @@ class ExportController extends Controller
array('device_number', '设备号'),
array('game_name', '游戏'),
array('pay_time', '购买时间'),
array('super_money', '超级签金额'),
array('pay_way', '支付方式'),
array('pay_price', '超级签金额'),
);
$xlsData = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->order('id DESC')->select();
$xlsData = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.pay_price,tab_game_supersign.pay_way,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->order('id DESC')->select();
foreach($xlsData as $k => $v) {
$xlsData[$k]['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
if($v['pay_way'] == 0) {
$xlsData[$k]['pay_way'] = '未知';
}elseif ($v['pay_way'] == 1) {
$xlsData[$k]['pay_way'] = '支付宝';
}elseif ($v['pay_way'] == 2) {
$xlsData[$k]['pay_way'] = '微信';
}
}
break;
case 24:
@ -2158,6 +2169,7 @@ class ExportController extends Controller
$map['tab_repair_pay.create_time'] = array('BETWEEN', [$startTime, $endTime]);
}
if(isset($params['type'])) {
$map['tab_repair_pay.type'] = $params['type'];
}

@ -302,7 +302,7 @@ class GameController extends ThinkController
if ($_POST['beta_status'] == 1 && empty($_POST['beta_url'])) {
return $this->error("请在Beta按钮开启的情况填写Beta链接");
}
if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
return $this->error("请填写正确的Beta链接");
}
/*if($_POST['apply_status']==0&&$_POST['game_status']==1){

@ -58,8 +58,8 @@ class PlatformController extends ThinkController
->select();
// dd($data);
$map2 = array();
$map['fgame_id'] = array('egt', 0);
$map['puid'] = 0;
$map2['fgame_id'] = array('egt', 0);
$map2['puid'] = 0;
setPowerPromoteIds($map2);
$data2 = $user->field('fgame_id,count(IF(register_time ' . $today . ',1,null)) as today,
@ -454,19 +454,67 @@ class PlatformController extends ThinkController
$data = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
date_format(FROM_UNIXTIME(register_time),"% ") AS time,
count(u.id) as count,
count(u.id) as count')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->join("tab_user as u on tp2.id = u.promote_id", 'left')
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->where($map)
->group('tp1.id')
->order('count desc, register_time')
->select();
//今日/本周/本月不变
$tmap = $map;
if(isset($tmap['register_time'])){
//获取最大最小
$tweek = total(2,false);
$tmonth = total(3,false);
//获取最小
$tmin = 0;
if($tweek[1][0] < $tmonth[1][0]){
$tmin = $tweek[1][0];
}else{
$tmin = $tmonth[1][0];
}
$tmap['register_time'] = ['between', array($tmin,$tmonth[1][1])];
}
$tdata = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
date_format(FROM_UNIXTIME(register_time),"% ") AS time,
count(IF(register_time ' . $today . ',1,null)) as today,
count(IF(register_time ' . $week . ',1,null)) as week,
count(IF(register_time ' . $mounth . ',1,null)) as mounth')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->join("tab_user as u on tp2.id = u.promote_id", 'left')
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->where($map)
->where($tmap)
->group('tp1.id')
->order('count desc, register_time')
->order('register_time')
->select();
$tmdata = [];
foreach($data as $k=>$v){
$v['today'] = 0;
$v['week'] = 0;
$v['mounth'] = 0;
$tmdata[$v['id']] = $v;
}
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
}
$data = [];
foreach($tmdata as $k => $v){
$data[] = $v;
}
unset($map['tp1.id']);
unset($map['tp1.chain']);
unset($tmap['tp1.chain']);
unset($tmap['tp1.chain']);
$map['promote_id'] = 0;
$authorityData['count'] = 0;
@ -475,13 +523,19 @@ class PlatformController extends ThinkController
if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) {
//官方渠道数据添加
$authorityData = M('user', 'tab_')->alias('u')
->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time,count(id) as count')
->where($map)
->find();
$tauthorityData = M('user', 'tab_')->alias('u')
->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time,
count(id) as count,
count(IF(register_time ' . $today . ',1,null)) as today,
count(IF(register_time ' . $week . ',1,null)) as week,
count(IF(register_time ' . $mounth . ',1,null)) as mounth')
->where($map)
->where($tmap)
->find();
$authorityData['today'] = $tauthorityData['today'];
$authorityData['week'] = $tauthorityData['week'];
$authorityData['mounth'] = $tauthorityData['mounth'];
}
$authorityData['promote_account'] = "官方渠道";
$authorityData['id'] = "1";
@ -540,20 +594,18 @@ class PlatformController extends ThinkController
$map1['promote_id'] = $map['promote_id'] = array('egt', 0);
$spend = M('Spend', 'tab_');
if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)];
$pay_time = " between " . strtotime($_REQUEST['timestart']) . " and " . (strtotime($_REQUEST['timeend']) + 86399) . " ";
$map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)];
unset($_REQUEST['timestart']);
unset($_REQUEST['timeend']);
} elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
$map['create_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())];
$pay_time = " between " . strtotime($_REQUEST['timestart']) . " and " . time() . " ";
$map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())];
unset($_REQUEST['timestart']);
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399];
$pay_time = " between 0 and " . (strtotime($_REQUEST['timeend']) + 86399) . " ";
$map['pay_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399];
unset($_REQUEST['timeend']);
} else {
$pay_time = " between 0 and " . time();
$map['pay_time'] = ['between', array(0, time())];
// $pay_time = " between 0 and " . time();
}
$map1['pay_status'] = $map['pay_status'] = 1;
$today = total(1);
@ -570,10 +622,21 @@ class PlatformController extends ThinkController
setPowerPromoteIds($map);
$promote_map2 = array();
setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->where($promote_map)->where($promote_map2)->select();
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->where($promote_map2)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote);
$tweek = total(2,false);
$tmonth = total(3,false);
//获取最小
$tmin = 0;
if($tweek[1][0] < $tmonth[1][0]){
$tmin = $tweek[1][0];
}else{
$tmin = $tmonth[1][0];
}
$data =array();
for ($i=0; $i < count($promote); $i++) {
# code...
@ -591,30 +654,29 @@ class PlatformController extends ThinkController
$map['server_name'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
}
}
$dbdata = $spend
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->field('floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count')
->where($map)
->where("pay_time".$pay_time)
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
} else {
$dbdata = $spend
$tmap = $map;
if(isset($map['pay_time'])){
$tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
}
$tdbdata = $spend
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($map)
->where("pay_time".$pay_time)
->where($tmap)
->find();
$dbdata['today']= $tdbdata['today'];
$dbdata['week']= $tdbdata['week'];
$dbdata['mounth']= $tdbdata['mounth'];
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
}
$data[] = $dbdata;
}
$count = count($data);
@ -641,11 +703,10 @@ class PlatformController extends ThinkController
$this->assign('userarpu_order_type', $data_order_type);
}
$page = set_pagination($count, $row);
$page = set_pagination($pcount, $row);
if ($page) {
$this->assign('_page', $page);
}
$data = array_slice($data, ($arraypage - 1) * $row, $row);
$data = my_sort($data, $data_order_type, (int)$data_order);
@ -759,9 +820,9 @@ class PlatformController extends ThinkController
$data[$key]['today']=$adata['today']==''?0:$adata['today'];
$data[$key]['week']=$adata['week']==''?0:$adata['week'];
$data[$key]['mounth']=$adata['mounth']==''?0:$adata['mounth']; */
// if ($data[$key]['promote_id'] == '0') {
// unset($data[$key]);
// }
// if ($data[$key]['promote_id'] == '0') {
// unset($data[$key]);
// }
}
$total = $this->data_total($data);
$this->assign('total', $total);

@ -8,6 +8,12 @@ class SuperStatisticalController extends ThinkController
private $ticketList_url = 'https://app.ipa365.com/Kirin/OpenApi/TicketList';
private $pay_way = [
0 => '未知',
1 => '支付宝',
2 => '微信',
];
public function index() {
$params = I('get.');
$startDate = empty($params['timestart']) ? '': $params['timestart'];
@ -126,6 +132,9 @@ class SuperStatisticalController extends ThinkController
if (isset($params['order_id'])) {
$map['tab_game_supersign.order_id'] = $params['order_id'];
}
if (isset($params['pay_way'])) {
$map['tab_game_supersign.pay_way'] = $params['pay_way'];
}
if (isset($params['account'])) {
$map['tab_user.account'] = $params['account'];
}
@ -148,9 +157,12 @@ class SuperStatisticalController extends ThinkController
if(isset($params['game_id'])) {
$map['tab_game_supersign.game_id'] = $params['game_id'];
}
$data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time,tab_game_supersign.pay_price')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->page($page,$row)->order('id DESC')->select();
$data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.pay_way,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time,tab_game_supersign.pay_price')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->page($page,$row)->order('id DESC')->select();
$count = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->count();
foreach($data as $k => $v) {
$data[$k]['pay_way'] = $this->pay_way[$v['pay_way']];
}
$pay_price = M('game_supersign', 'tab_')->field('sum(pay_price) as pay_price')->where($map)->select();
$super_money_all = $pay_price[0]['pay_price'] == '' ? 0 : $pay_price[0]['pay_price'];
$page = set_pagination($count, $row);

File diff suppressed because it is too large Load Diff

@ -35,10 +35,12 @@
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list">
<a class="sch-btn" href="{:U('PayChannel/index')}" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
</div>
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}"
placeholder="开始时间"/>

@ -96,6 +96,14 @@
</volist>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select id='pay_way' name="pay_way" style="color:#444" class="select_gallery" >
<option value="">支付方式</option>
<volist name=":all_pay_way(1)" id="vo">
<option value="{$vo.key}" <?php echo isset($_GET['pay_way']) && $_GET['pay_way'] == $vo['key'] ?'selected':''; ?> >{$vo.value}</option>
</volist>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list search_item">
@ -116,6 +124,7 @@
<th>设备号</th>
<th>游戏</th>
<th>购买时间</th>
<th>支付方式</th>
<th>超级签金额</th>
</tr>
</thead>
@ -129,6 +138,7 @@
<td>{$vo.device_number}</td>
<td>{$vo.game_name}</td>
<td>{$vo.pay_time|date='Y-m-d H:i:s',###}</td>
<td>{$vo.pay_way}</td>
<td>{$vo.pay_price}</td>
</tr>
</volist>
@ -139,6 +149,7 @@
<td>--</td>
<td>--</td>
<td>--</td>
<td>--</td>
<td>{$super_money_all}</td>
</tr>
</tbody>

@ -3233,15 +3233,20 @@ class DownloadController extends BaseController {
// ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->join('join tab_user as u on u.id = uc.user_id')
->where($map)
->group('uc.game_player_id,uc.server_id,uc.game_id')
->group('uc.game_player_id,uc.server_id,uc.game_id,uc.user_id')
->buildSql();
$roles = M()->alias('record')
->table($subQuery)
->select();
$total = M('spend','tab_')->alias('uc')
->field("$fieldS,$fieldToday as recharge_cost_today")
$total = M('spend', 'tab_')->alias('uc')
->field($fieldS)
->where($map)
->find();
$map['uc.pay_time'] = $spendMap['today.pay_time'];
$total['recharge_cost_today'] = M('spend', 'tab_')->alias('uc')
->field('sum(uc.pay_amount) as recharge_cost_today')
->where($map)
->find()['recharge_cost_today'];
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers

@ -1863,7 +1863,7 @@ class QueryController extends BaseController
->field($field)
->join('join tab_user as u on u.id = s.user_id')
->where($map)
->group('s.game_player_id, s.server_id, s.game_id')
->group('s.game_player_id, s.server_id, s.game_id, s.user_id')
->having($having)
->buildSql();
$query = M()->alias('record')
@ -1873,9 +1873,14 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query);
$total = M('spend', 'tab_')->alias('s')
->field("$fieldS, $fieldToday as recharge_cost_today")
->field($fieldS)
->where($map)
->find();
$map['s.pay_time'] = $spendMap['today.pay_time'];
$total['recharge_cost_today'] = M('spend', 'tab_')->alias('s')
->field('sum(s.pay_amount) as recharge_cost_today')
->where($map)
->find()['recharge_cost_today'];
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];
if (!empty($records)) {

@ -467,7 +467,7 @@
<div class="register-forget">
<div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div>
<span>《用户协议》</span>
<span><a href="/mobile.php?s=/News/protocol.html">《用户协议》</a></span>
</div>
<div class="phoneCut">
<img src="__IMG__/20191225/qiehuan.png" alt="">
@ -501,7 +501,7 @@
<div class="register-forget">
<div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div>
<span>《用户协议》</span>
<span><a href="/mobile.php?s=/News/protocol.html">《用户协议》</a></span>
</div>
<div class="commonCut">
<img src="__IMG__/20191225/qiehuan.png" alt="">
@ -525,7 +525,7 @@
<div class="one-contain">
首次安装必须<span>打开应用</span>,并点击<span>“继续”</span>按钮后,才可进行第二步操作
</div>
<a href="#" class="mounting-btn">点击安装TestFlight平台</a>
<a href="https://itunes.apple.com/cn/app/testflight/id899247664?mt=8" target="_blank" class="mounting-btn">点击安装TestFlight平台</a>
<div class="title-two">第二步:点击下方按钮安装游戏</div>
<a id="beta-url" href="#" class="mounting-btn">点击安装游戏</a>
</div>
@ -724,8 +724,7 @@ var PhoneObj = {
success: function (result) {
if (result.code == '0000') {
$(".phone").hide();
$('.mounting').show();
$('#beta-url').attr('href', $('[name=betaUrl]').val())
showMounting()
} else {
alert(result.msg)
}
@ -733,6 +732,12 @@ var PhoneObj = {
})
})
function showMounting()
{
$('.mounting').show();
$('#beta-url').attr('href', $('[name=betaUrl]').val())
}
$("#loginBtn").on("click",function() {
var box = $('#login-box')
var account = box.find('[name=account]').val()
@ -772,8 +777,7 @@ var PhoneObj = {
success: function (result) {
if (result.code == '0000') {
$('.login').hide();
$('.mounting').show();
$('#beta-url').attr('href', $('[name=betaUrl]').val())
showMounting()
} else {
alert(result.msg);
}
@ -819,8 +823,7 @@ var PhoneObj = {
success: function (result) {
if (result.code == '0000') {
$(".common").hide();
$('.mounting').show();
$('#beta-url').attr('href', $('[name=betaUrl]').val())
showMounting()
} else {
alert(result.msg)
}

Loading…
Cancel
Save