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);
$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);
@ -628,6 +626,17 @@ class PlatformController extends ThinkController
$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...
@ -645,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);

@ -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('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')
$totalSql = M('spend', 'tab_')->alias('uc')
->field("$fieldS, $fieldToday as recharge_cost_today")
->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();
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
$csvFileName = $xlsName.'.csv';

@ -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')
@ -1872,9 +1872,13 @@ class QueryController extends BaseController
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")
->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();
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];

@ -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="">
@ -520,12 +520,12 @@
<div class="mounting-text">
<div class="title-one">
第一步下载苹果官方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 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>

Loading…
Cancel
Save