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

master
zhanglingsheng 5 years ago
commit 08e98945ed

@ -594,20 +594,18 @@ class PlatformController extends ThinkController
$map1['promote_id'] = $map['promote_id'] = array('egt', 0); $map1['promote_id'] = $map['promote_id'] = array('egt', 0);
$spend = M('Spend', 'tab_'); $spend = M('Spend', 'tab_');
if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)]; $map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)];
$pay_time = " between " . strtotime($_REQUEST['timestart']) . " and " . (strtotime($_REQUEST['timeend']) + 86399) . " ";
unset($_REQUEST['timestart']); unset($_REQUEST['timestart']);
unset($_REQUEST['timeend']); unset($_REQUEST['timeend']);
} elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { } elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
$map['create_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())]; $map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())];
$pay_time = " between " . strtotime($_REQUEST['timestart']) . " and " . time() . " ";
unset($_REQUEST['timestart']); unset($_REQUEST['timestart']);
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { } elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399]; $map['pay_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399];
$pay_time = " between 0 and " . (strtotime($_REQUEST['timeend']) + 86399) . " ";
unset($_REQUEST['timeend']); unset($_REQUEST['timeend']);
} else { } 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; $map1['pay_status'] = $map['pay_status'] = 1;
$today = total(1); $today = total(1);
@ -628,6 +626,17 @@ class PlatformController extends ThinkController
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount']; $pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote); // 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(); $data =array();
for ($i=0; $i < count($promote); $i++) { for ($i=0; $i < count($promote); $i++) {
# code... # code...
@ -645,30 +654,29 @@ class PlatformController extends ThinkController
$map['server_name'] = $_REQUEST['server_id']; $map['server_name'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']); unset($_REQUEST['server_id']);
} }
$dbdata = $spend }
->field(' $dbdata = $spend
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count, ->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, ->where($map)
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, ->find();
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') $tmap = $map;
->where($map) if(isset($map['pay_time'])){
->where("pay_time".$pay_time) $tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
} else {
$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')
->where($map)
->where("pay_time".$pay_time)
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
} }
$tdbdata = $spend
->field('
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($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; $data[] = $dbdata;
} }
$count = count($data); $count = count($data);
@ -812,10 +820,10 @@ class PlatformController extends ThinkController
$data[$key]['today']=$adata['today']==''?0:$adata['today']; $data[$key]['today']=$adata['today']==''?0:$adata['today'];
$data[$key]['week']=$adata['week']==''?0:$adata['week']; $data[$key]['week']=$adata['week']==''?0:$adata['week'];
$data[$key]['mounth']=$adata['mounth']==''?0:$adata['mounth']; */ $data[$key]['mounth']=$adata['mounth']==''?0:$adata['mounth']; */
// if ($data[$key]['promote_id'] == '0') { // if ($data[$key]['promote_id'] == '0') {
// unset($data[$key]); // unset($data[$key]);
// } // }
} }
$total = $this->data_total($data); $total = $this->data_total($data);
$this->assign('total', $total); $this->assign('total', $total);
if ($_REQUEST['data_order'] != '') { if ($_REQUEST['data_order'] != '') {

@ -3233,14 +3233,18 @@ 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('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') ->join('join tab_user as u on u.id = uc.user_id')
->where($map) ->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(); ->buildSql();
$roles = M()->alias('record') $roles = M()->alias('record')
->table($subQuery) ->table($subQuery)
->select(); ->select();
$total = M('spend','tab_')->alias('uc') $totalSql = M('spend', 'tab_')->alias('uc')
->field("$fieldS,$fieldToday as recharge_cost_today") ->field("$fieldS, $fieldToday as recharge_cost_today")
->where($map) ->where($map)
->buildSql();
$total = M()->table($totalSql)
->alias('total')
->field('sum(recharge_cost) as recharge_cost, sum(recharge_count) as recharge_count, sum(recharge_cost_today) as recharge_cost_today')
->find(); ->find();
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today']; $total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
$csvFileName = $xlsName.'.csv'; $csvFileName = $xlsName.'.csv';

@ -1863,7 +1863,7 @@ class QueryController extends BaseController
->field($field) ->field($field)
->join('join tab_user as u on u.id = s.user_id') ->join('join tab_user as u on u.id = s.user_id')
->where($map) ->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) ->having($having)
->buildSql(); ->buildSql();
$query = M()->alias('record') $query = M()->alias('record')
@ -1872,9 +1872,13 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query); list($records, $pagination, $count) = $this->paginate($query);
$total = M('spend', 'tab_')->alias('s') $totalSql = M('spend', 'tab_')->alias('s')
->field("$fieldS, $fieldToday as recharge_cost_today") ->field("$fieldS, $fieldToday as recharge_cost_today")
->where($map) ->where($map)
->buildSql();
$total = M()->table($totalSql)
->alias('total')
->field('sum(recharge_cost) as recharge_cost, sum(recharge_count) as recharge_count, sum(recharge_cost_today) as recharge_cost_today')
->find(); ->find();
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today']; $total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];

@ -467,7 +467,7 @@
<div class="register-forget"> <div class="register-forget">
<div> <div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</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>
<div class="phoneCut"> <div class="phoneCut">
<img src="__IMG__/20191225/qiehuan.png" alt=""> <img src="__IMG__/20191225/qiehuan.png" alt="">
@ -501,7 +501,7 @@
<div class="register-forget"> <div class="register-forget">
<div> <div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</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>
<div class="commonCut"> <div class="commonCut">
<img src="__IMG__/20191225/qiehuan.png" alt=""> <img src="__IMG__/20191225/qiehuan.png" alt="">
@ -520,12 +520,12 @@
<div class="mounting-text"> <div class="mounting-text">
<div class="title-one"> <div class="title-one">
第一步下载苹果官方TestFlight 第一步下载苹果官方TestFlight
<a href="https://apps.apple.com/cn/app/testflight/id899247664"><img src="__IMG__/20191225/biaoshi.png" alt=""></a> <img src="__IMG__/20191225/biaoshi.png" alt="">
</div> </div>
<div class="one-contain"> <div class="one-contain">
首次安装必须<span>打开应用</span>,并点击<span>“继续”</span>按钮后,才可进行第二步操作 首次安装必须<span>打开应用</span>,并点击<span>“继续”</span>按钮后,才可进行第二步操作
</div> </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> <div class="title-two">第二步:点击下方按钮安装游戏</div>
<a id="beta-url" href="#" class="mounting-btn">点击安装游戏</a> <a id="beta-url" href="#" class="mounting-btn">点击安装游戏</a>
</div> </div>

Loading…
Cancel
Save