@ -142,8 +142,10 @@ class QueryController extends BaseController
$data = [];
$count = 0;
$income = '0.00';
if (intval($endTime - $begTime) / (24 * 3600) < = 31
|| intval($payedEndTime - $payedBegTime) / (24 * 3600) < = 31) {
if (
intval($endTime - $begTime) / (24 * 3600) < = 31
|| intval($payedEndTime - $payedBegTime) / (24 * 3600) < = 31
) {
$data = M('Spend', 'tab_')
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain,tab_promote.level,tab_promote.parent_id')
->join('tab_game on tab_spend.game_id = tab_game.id')
@ -331,7 +333,6 @@ class QueryController extends BaseController
if (!empty($list['device_number'])) {
$list['device_number'] = encryption($list['device_number']);
}
}
}
@ -581,7 +582,6 @@ class QueryController extends BaseController
$promote_child = get_sub_channel_id($chid, PRO_GRADE + 1);
$map['s.promote_id'] = $mapp['u.promote_id'] = array('in', $promote_child);
} else {
$promote_child = get_zi_promote_id(PID);
if (empty($promote_child)) {
@ -601,12 +601,10 @@ class QueryController extends BaseController
$mmap = array($mapp, $map);
$user = A('User', 'Event');
$user->check_child_bill($model, $p, $mmap);
} else {
$this->meta_title = '子渠道结算';
$this->display();
}
}
public function generatesub()
@ -702,7 +700,6 @@ class QueryController extends BaseController
public function son_apply_withdraw($settlement_number = '')
{
$map['settlement_number'] = $settlement_number;
$with_map['settlement_number'] = $totalSett['settlement_number'];
$result = M("SonSettlement", "tab_")->where($map)->save(array('ti_status' => 0));
if ($result !== false) {
echo json_encode(array("status" => 1));
@ -714,7 +711,6 @@ class QueryController extends BaseController
public function audit_withdraw($settlement_number = '')
{
$map['settlement_number'] = $settlement_number;
$with_map['settlement_number'] = $totalSett['settlement_number'];
$result = M("SonSettlement", "tab_")->where($map)->save(array('ti_status' => 1));
if ($result !== false) {
$this->success('审核成功');
@ -949,7 +945,6 @@ class QueryController extends BaseController
$map_list['promote_id'] = array('in', $pro_arr);
$promote_id = implode(',', $pro_arr);
$join .= " AND u.promote_id in ({$promote_id})";
}
$spend2 = D('Spend');
$data = M('Apply', 'tab_')->field('game_id, game_name')->where(['promote_id' => $promote_id])->order('game_id desc')->select();
@ -1067,7 +1062,6 @@ class QueryController extends BaseController
{
$this->meta_title = '留存统计';
A('User', 'Event')->retention_analysis();
}
public function details()
@ -1469,14 +1463,12 @@ class QueryController extends BaseController
$promote = $_REQUEST['promote_id'];
if (PID == $promote) {
} else {
$pids = get_prmoote_chlid_account($promote);
$pro_arr = array_column($pids, 'id');
$pro_arr[] = $promote;
$promote = implode(',', $pro_arr);
}
$game = M('apply', 'tab_')
@ -1736,7 +1728,8 @@ class QueryController extends BaseController
}
if ($roleName != '') {
$map['role_name'] = ['like', '%' . $roleName . '%'];
}if ($roleId != '') {
}
if ($roleId != '') {
$map['role_id'] = $roleId;
}
if ($userAccount != '') {
@ -1865,7 +1858,7 @@ class QueryController extends BaseController
$this->assign('unique_user_count', $uniqueCountRow['user_count']);
$this->assign('unique_count', $uniqueCountRow['count']);
$this->assign('sort', $sort);
$this->assign('setdate', date('Y-m-d', $nowTime ));
$this->assign('setdate', date('Y-m-d'));
$this->assign('games', $games);
$this->assign('records', $records);
$this->assign('pagination', $pagination);
@ -2590,7 +2583,8 @@ class QueryController extends BaseController
return M('server', 'tab_')->where($map)->getField('server_name');
}
public function iosDownLoadData() {
public function iosDownLoadData()
{
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row = intval(I('get.row', 10));
@ -2745,11 +2739,11 @@ class QueryController extends BaseController
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('allIosCounts', $allIosCounts);
$this->assign('tfpercent', $tfpercent);
$this->display();
}
public function iosDownLoadDetail() {
public function iosDownLoadDetail()
{
$promote_id = $_REQUEST['promote_id'];
$belongs_president = $_REQUEST['belongs_president'];
$belongs_department = $_REQUEST['belongs_department'];
@ -2779,7 +2773,6 @@ class QueryController extends BaseController
}
if (!empty(I('type'))) {
$map['type'] = I('type');
}
$map['promote_id'] = $promote_id;
//$packAges = M('package_download_log', 'tab_')->field('id,game_id,user_id,type,create_time')->where(['promote_id'=>$promote_id])->select();
@ -2805,7 +2798,6 @@ class QueryController extends BaseController
$packAges[$key]['belongs_department'] = $belongs_department;
$packAges[$key]['belongs_group'] = $belongs_group;
$packAges[$key]['account'] = getUserAccountOfPromote($packAges[$key]['account'], $loginPromote);
}
$tfMap['promote_id'] = $promote_id;
$tfMap['type'] = 2;
@ -2934,9 +2926,6 @@ class QueryController extends BaseController
$dayList = [1, 2, 3, 4, 5, 6, 7, 15, 30];
$gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name'];
$promoteName = '全部';
if ($promoteId) {
$promoteName = get_promote_account($promoteId);
}
foreach ($data as $key => $item) {
$item['promote_name'] = $promoteName;
$item['game_name'] = $gameName;