Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
chenzhi 5 years ago
commit 0ca7d2f5d2

@ -387,19 +387,24 @@ class PlatformController extends ThinkController
->group('tp1.id')
->order('count desc, register_time')
->select();
unset($map['tp1.id']);
unset($map['tp1.chain']);
$map['promote_id'] = 0;
//官方渠道数据添加
$authorityData = M('user', 'tab_')->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(['promote_id'=>0])
->where($map)
->find();
$authorityData['promote_account'] = "官方渠道";
$authorityData['id'] = "1";
// $authorityData = [];
if (isset($_REQUEST['promote_id'])||$authorityData['count']==0) {
$authorityData = [];
} else {
array_push($data, $authorityData);
}
array_push($data, $authorityData);
//数据排序
$last_names = array_column($data,'count');
array_multisort($last_names,SORT_DESC,$data);

@ -412,7 +412,8 @@ class DownloadController extends BaseController {
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$gameId = intval(I('game_id', 0));
$status = intval(I('status', 0));
$map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$ids[] = $this->loginPromote['id'];
@ -423,7 +424,9 @@ class DownloadController extends BaseController {
if (!empty($payOrderNumber)) {
$map['pay_order_number'] = $payOrderNumber;
}
if (!empty($gameId)) {
$map['game_id'] = $gameId;
}
if (!empty($begTime) && empty($endTime)) {
$map['pay_time'] = ['egt', $begTime];
} elseif (empty($begTime) && !empty($endTime)) {
@ -431,6 +434,22 @@ class DownloadController extends BaseController {
} elseif (!empty($begTime) && !empty($endTime)) {
$map['pay_time'] = ['between', [$begTime, $endTime + 86399]];
}
if (isset($_GET['status'])) {
if ($status == -2) {
$map['selle_status'] = 0;
} else {
$withdrawMap['promote_id'] = $this->loginPromote['id'];
$withdrawMap['status'] = $status;
$withdrawIds = M('withdraw', 'tab_')->where($withdrawMap)->getField('id', true);
if (empty($withdrawIds)) {
$map = '1 = 2';
} else {
$map['withdraw_id'] = ['in', $withdrawIds];
}
}
}
$conditions = json_encode($map,TRUE);
$addtime = time();
$data = [

Loading…
Cancel
Save