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

master
chenxiaojun 5 years ago
commit f8b29d9d12

@ -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'];
}
@ -2166,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'];
}

@ -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,
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')
->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(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($tmap)
->find();
$authorityData['today'] = $tauthorityData['today'];
$authorityData['week'] = $tauthorityData['week'];
$authorityData['mounth'] = $tauthorityData['mounth'];
}
$authorityData['promote_account'] = "官方渠道";
$authorityData['id'] = "1";

@ -132,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'];
}

@ -96,6 +96,14 @@
</volist>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="pay_way" style="color:#444" class="select_gallery" id="promote_id">
<option value="">支付方式</option>
<option value="0" <?php if (isset($_GET['pay_way']) && $_GET['pay_way'] == 0):?>selected<?php endif;?>>未知</option>
<option value="1" <?php if ($_GET['pay_way'] == 1):?>selected<?php endif;?>>支付宝</option>
<option value="2" <?php if ($_GET['pay_way'] == '2'):?>selected<?php endif;?>>微信</option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list search_item">

Loading…
Cancel
Save