推广员结算订单归属

master
ELF 4 years ago
parent ccd5b487a9
commit 7468057834

@ -20,7 +20,7 @@ class PromoteRepository {
/**
* 获取业绩公共map
*/
private function getPublicAchievementMap($ids, $params)
private function getPublicAchievementMap($ids, $params, $type = null)
{
$isContainSubs = false;
if (isset($params['isContainSubs']) && $params['isContainSubs']) {
@ -51,6 +51,10 @@ class PromoteRepository {
if (isset($params['begin_time']) && isset($params['end_time']) && isset($params['time_column'])) {
$map[$params['time_column']] = ['between', [$params['begin_time'], $params['end_time']]];
}
if ($type == 'spend') {
$spendRepository = new SpendRepository();
$map = $spendRepository->withIsCheck($map);
}
if (isset($params['lock_status'])) {
$lockUserIds = M('user', 'tab_')->where(['lock_status' => 0, 'promote_id' => ['in', $allIds]])->getField('id', 'true');
if (count($lockUserIds) > 0) {
@ -308,7 +312,7 @@ class PromoteRepository {
}
$params['time_column'] = 'pay_time';
$map = $this->getPublicAchievementMap($ids, $params);
$map = $this->getPublicAchievementMap($ids, $params, 'spend');
$items = M('spend', 'tab_')->field(['count(*) count', 'promote_id'])->where($map)->group('promote_id')->select();
@ -340,7 +344,7 @@ class PromoteRepository {
}
$params['time_column'] = 'pay_time';
$map = $this->getPublicAchievementMap($ids, $params);
$map = $this->getPublicAchievementMap($ids, $params, 'spend');
$items = M('spend', 'tab_')->field(['count(distinct user_id) count', 'promote_id'])->where($map)->group('promote_id')->select();
$records = [];
@ -371,7 +375,7 @@ class PromoteRepository {
}
$params['time_column'] = 'pay_time';
$map = $this->getPublicAchievementMap($ids, $params);
$map = $this->getPublicAchievementMap($ids, $params, 'spend');
$map['pay_status'] = 1;
$items = M('spend', 'tab_')->field(['sum(pay_amount) amount', 'promote_id', 'pay_way'])->where($map)->group('promote_id, pay_way')->select();
// echo M()->getLastSql();die();

@ -43,6 +43,8 @@ class SpendRepository
$conditions['pay_status'] = 1;
$conditions['pay_time'] = ['between', [$beginTime, $endTime]];
$conditions = $this->withIsCheck($conditions);
return $conditions;
}
@ -65,6 +67,8 @@ class SpendRepository
}
$conditions['pay_time'] = ['between', [$beginTime, $endTime]];
$conditions = $this->withIsCheck($conditions);
return $conditions;
}
@ -85,6 +89,9 @@ class SpendRepository
if (isset($params['server_id'])) {
$conditions['server_id'] = $serverId;
}
$conditions = $this->withIsCheck($conditions);
$conditions['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
return $conditions;
}
@ -108,6 +115,9 @@ class SpendRepository
if (isset($params['pay_way'])) {
$conditions['pay_way'] = $params['pay_way'];
}
$conditions = $this->withIsCheck($conditions);
return $conditions;
}
@ -370,8 +380,8 @@ class SpendRepository
return $this->assembleRecords($items, $gameIds, 'count', 'game_id');
}
public function getCommonQuery($params, $columns = '*')
public function withIsCheck($map, $column = 'is_check')
{
// return M('spend', 'tab_')->field($columns)->where($map);
return array_merge($map, [$column => 1]);
}
}

@ -290,6 +290,7 @@ class TestingResourceRepository
}
}
$spendItems = [];
if (count($bindingRoles) > 0) {
$spendOrWhere = [];
@ -300,13 +301,18 @@ class TestingResourceRepository
'pay_status' => 1,
'_string' => '(' . implode(' or ', $spendOrWhere) . ')',
];
$subBindingCondition = [
'_string' =>
'tab_testing_binding.bind_role_id = tab_spend.game_player_id and ' .
'tab_testing_binding.game_id = tab_spend.game_id and ' .
'UNIX_TIMESTAMP(FROM_UNIXTIME(tab_testing_binding.create_time, "%Y-%m-%d 00:00:00")) <= tab_spend.pay_time'
];
$spendRepository = new SpendRepository();
$subBindingCondition = $spendRepository->withIsCheck($subBindingCondition, 'tab_spend.is_check');
$spendCondition = $spendRepository->withIsCheck($spendCondition);
$subBindingSql = M('testing_binding', 'tab_')
->where([
'_string' =>
'tab_testing_binding.bind_role_id = tab_spend.game_player_id and ' .
'tab_testing_binding.game_id = tab_spend.game_id and ' .
'UNIX_TIMESTAMP(FROM_UNIXTIME(tab_testing_binding.create_time, "%Y-%m-%d 00:00:00")) <= tab_spend.pay_time'
])
->where($subBindingCondition)
->select(false);
$spendCondition['_string'] .= ' and exists(' . $subBindingSql . ')';
$spendList = M('spend', 'tab_')

@ -2,6 +2,7 @@
namespace Base\Service;
use Base\Facade\Request;
use Base\Repository\SpendRepository;
class PromoteGradeService
{
@ -153,12 +154,15 @@ class PromoteGradeService
'_string' => 'user_id in (' . $userSubSql . ')'
];
$spendRepository = new SpendRepository();
$spendMap = [
'pay_time' => ['between', $betweenTime],
'pay_status' => 1,
'promote_id' => ['in', $promoteIds],
'_string' => 'user_id in (' . $userSubSql . ')'
];
$spendMap = $spendRepository->withIsCheck($spendMap);
if ($baseGame) {
$roleMap['game_id'] = ['in', [$baseGame['android_game_id'], $baseGame['ios_game_id']]];

@ -338,7 +338,7 @@ class PromoteService {
$users = M('user', 'tab_')->field(['id', 'account', 'nickname'])->where($map)->select();
$spendMap['pay_time'] = ['egt', $orderTime];
$spendMap['is_check'] = ['in','1,2'];
// $spendMap['is_check'] = ['in','1,2'];
$spendMap['settle_check'] = 0;
$spendMap['selle_status'] = 0;
$spendMap['pay_status'] = 1;

@ -4,6 +4,7 @@ namespace Base\Service;
use Base\Facade\Request;
use Base\Tool\GameResource;
use Base\Repository\TestingResourceRepository;
use Base\Repository\SpendRepository;
use Think\Model;
class TestingResourceService
@ -154,13 +155,18 @@ class TestingResourceService
$totalQuota = $role['testing_other_quota'] + ($gameSetting['base_quota'] ?? 0);
if (!is_null($bindRole)) {
$bindTime = $bindRole['binding_time'] ?? 0;
$spendMap = [
'game_id' => $role['game_id'],
'game_player_id' => $bindRole['role_id'],
'pay_status' => 1,
'pay_time' => ['egt', strtotime(date('Y-m-d 00:00:00', $bindTime))]
];
$spendRepository = new SpendRepository();
$spendMap = $spendRepository->withIsCheck($spendMap);
$spendQuota += M('spend', 'tab_')
->where([
'game_id' => $role['game_id'],
'game_player_id' => $bindRole['role_id'],
'pay_status' => 1,
'pay_time' => ['egt', strtotime(date('Y-m-d 00:00:00', $bindTime))]
])
->where($spendMap)
->group('game_id,game_player_id')
->sum('pay_amount');
$totalQuota += round($gameSetting['rate'] / 100 * $spendQuota, 2);

@ -1385,4 +1385,32 @@ function data2csv(&$data,$title,$fields){
ob_flush();
fclose($fp); //每生成一个文件关闭
die();
}
function is_active_menu(array $controllers, array $actions, \Closure $otherCondition = null)
{
$controllerStatus = true;
$actionStatus = true;
$otherConditionStatus = true;
if ($controllers && !in_array(CONTROLLER_NAME, $controllers)) {
$controllerStatus = false;
}
if ($actions && !in_array(ACTION_NAME, $actions)) {
$actionStatus = false;
}
if ($otherCondition) {
$otherConditionStatus = $otherCondition();
}
if ($controllerStatus && $actionStatus && $otherConditionStatus) {
return true;
}
return false;
}
function is_active_class(array $controllers, array $actions, \Closure $otherCondition = null)
{
if (is_active_menu($controllers, $actions, $otherCondition)) {
return 'active';
}
return '';
}

@ -18,7 +18,8 @@ use GuzzleHttp\Client;
/**
* @author elf<360197197@qq.com>
*/
class DownloadController extends BaseController {
class DownloadController extends BaseController
{
public $payWay = [
-1 => '绑币',
0 => '平台币',
@ -46,6 +47,14 @@ class DownloadController extends BaseController {
0 => '下单未支付',
1 => '充值成功',
];
public $spendRepository;
protected function _initialize()
{
parent::_initialize();
$this->spendRepository = new SpendRepository();
}
/**
* excel
@ -1491,8 +1500,6 @@ class DownloadController extends BaseController {
empty(I('game_player_name')) || $map['tab_spend.game_player_name'] = ['like', '%' . I('game_player_name') . '%'];
empty(I('user_account')) || $map['tab_spend.user_account'] = ['like', '%' . I('user_account') . '%'];
empty(I('pay_order_number')) || $map['tab_spend.pay_order_number'] = I('pay_order_number');
// $map['tab_spend.pay_status'] = 1;
// $map['tab_spend.is_check'] = ['neq', 2];
if (isset($_REQUEST['pay_status']) && $_REQUEST['pay_status'] !== '') {
$payStatus = intval(I('pay_status'));
@ -1500,9 +1507,12 @@ class DownloadController extends BaseController {
$map['tab_spend.pay_status'] = $payStatus + 2;
}
}
$conditions = json_encode($map,TRUE);
$addtime = time();
$data = [
$map = $this->spendRepository->withIsCheck($map, 'tab_spend.is_check');
$conditions = json_encode($map, true);
$addtime = time();
$data = [
'logid' => 'cz_'.time(),
'promote_id' => PID,
'type' => '/Home/Query/recharge',
@ -2234,6 +2244,8 @@ class DownloadController extends BaseController {
}
}
$spendMap = $this->spendRepository->withIsCheck($spendMap);
$spendSubSql = M('spend', 'tab_')->field(['game_id', 'server_id', 'sum(pay_amount) amount'])->where($spendMap)->group('game_id, server_id')->select(false);
$roleSubSql = M('user_play_info', 'tab_')->field(['game_id', 'server_id', 'count(*) count'])->where($roleMap)->group('game_id, server_id')->select(false);
@ -4476,6 +4488,9 @@ public function iosDetailExcelInfo($id,$map) {
$spendMap['today.pay_status'] = 1;
$spendMap['today.pay_time'] = ['between', [$now, $nowTimeEnd]];
$map = $this->spendRepository->withIsCheck($map, 'uc.is_check');
$spendMap = $this->spendRepository->withIsCheck($spendMap, 'today.is_check');
$fieldToday = M('spend', 'tab_')->alias('today')
->field('sum(pay_amount) as recharge_cost_today')
->where($spendMap)

@ -24,6 +24,14 @@ class FinanceController extends BaseController
2 => '已汇款',
];
public $spendRepository;
protected function _initialize()
{
parent::_initialize();
$this->spendRepository = new SpendRepository();
}
//权限过滤
private function purview()
{
@ -127,6 +135,7 @@ class FinanceController extends BaseController
$map = [];
$map['pay_status'] = 1;
$map['promote_id'] = ['in', $promoteIds];
$map = $this->spendRepository->withIsCheck($map);
$income = $model->field("sum(if(pay_time < $thisDay, if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as history_income,
sum(if(pay_time >= $thisMonth, if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as this_month_income,
sum(if((pay_time >= $yesterday and pay_time < $thisDay), if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as yesterday_income,
@ -215,6 +224,7 @@ class FinanceController extends BaseController
} else {
$map['pay_status'] = 1;
$map['selle_status'] = 0;
$map = $this->spendRepository->withIsCheck($map);
$balance = M('spend', 'tab_')->field('sum(pay_amount * selle_ratio) as balance')->where($map)->find()['balance'];
$balance = $balance ? bcdiv($balance , 100, 2) : 0;
$settlementType = 3;
@ -290,7 +300,7 @@ class FinanceController extends BaseController
private function getSumMoney($map = [])
{
$map['pay_status'] = 1;
$map = $this->spendRepository->withIsCheck($map);
$sumAmount = M('spend', 'tab_')->field('sum(pay_amount) as sum_amount')->where($map)->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
return $sumAmount;
@ -396,7 +406,7 @@ class FinanceController extends BaseController
}
}
}
$map = $this->spendRepository->withIsCheck($map);
$data = $model->field('pay_order_number,game_name,user_account,promote_id,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
->where($map)
->order('id desc')
@ -505,6 +515,9 @@ class FinanceController extends BaseController
$map['selle_status'] = 0;
$map['promote_id'] = ['in', $promoteIds];
$map['pay_time'] = ['lt', $thisDay];
$map = $this->spendRepository->withIsCheck($map);
$balance = $spendModel->field("sum(pay_amount * selle_ratio) as balance")
->where($map)
->find()['balance'];
@ -742,6 +755,8 @@ class FinanceController extends BaseController
$map['pay_order_number'] = $payOrderNumber;
}
$map = $this->spendRepository->withIsCheck($map);
$data = $spendModel
->field('id,pay_order_number,game_name,sdk_version,user_account,pay_amount,pay_way,selle_ratio,pay_time')
->where($map)
@ -896,6 +911,9 @@ class FinanceController extends BaseController
$this->ajaxReturn($data);
}
$spendMap = [];
$spendMap = $this->spendRepository->withIsCheck($spendMap);
$spendMap['withdraw_id'] = $id;
$spendIds = M('Spend', 'tab_')->where($spendMap)->getField('id', true);
if (empty($spendIds)) {

@ -25,7 +25,7 @@ use Home\Model\UserPlayModel;
use Home\Model\PromoteModel;
use Base\Service\PromoteService;
use Base\Service\ApplyService;
use Base\Repository\SpendRepository;
use Org\RedisSDK\Redis;
/**
@ -34,6 +34,15 @@ use Org\RedisSDK\Redis;
*/
class PromoteController extends BaseController
{
public $spendRepository;
protected function _initialize()
{
parent::_initialize();
$this->spendRepository = new SpendRepository();
}
//系统首页
public function index($p = 1)
{
@ -132,11 +141,6 @@ class PromoteController extends BaseController
$promoteId = array(get_pid());
//计算当日用户充值数据
// $map['_string'] = "promote_id = {$promote_id} or tab_promote.parent_id = {$promote_id} or tab_promote.grand_id = {$promote_id} ";
//计算当日用户充值数据
// $map['_string'] = "promote_id = {$promote_id} or tab_promote.parent_id = {$promote_id} or tab_promote.chain like '%/{$promote_id}/%' ";
$pay_time = " between 0 and " . time();
$spendData = $this->caculateSpend($pay_time, []);
@ -169,22 +173,6 @@ class PromoteController extends BaseController
->order('count desc, register_time')
->find();
// $data = M('User', 'tab_')
// ->field('promote_account,promote_id,date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(tab_user.id) as count,
// IF(tab_promote.grand_id>0,tab_promote.grand_id,IF(tab_promote.grand_id=0 and tab_promote.parent_id >0,tab_promote.parent_id,promote_id)) as promote_id1 ,
// count(IF(register_time ' . $yesterdays . ',1,null)) as yesterday,
// 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 on promote_id = tab_promote.id', 'left')
// ->where($map)
// ->group('promote_id1')
// ->having('promote_id != 0')
// ->order('count desc,register_time')
// ->find();
// var_dump($data);die();
// echo M('promote', 'tab_')->_sql();die();
$total_money = $this->pay_total(0, 0, $promoteId);
$today_add_user_money = $this->pay_total(1, 1, $promoteId);
$month_add_user_money = $this->pay_total(3, 1, $promoteId);
@ -194,8 +182,6 @@ class PromoteController extends BaseController
//计算昨天用户的统计数据,当日用户充值数据
$pay_time = " between {$yesterday_start} and {$yesterday_end}";
$createTime = ['between', array($yesterday_start, $yesterday_end - 1)];
// $yesterdaySpendData = $this->caculateSpend($pay_time, []);
// var_dump($yesterdaySpendData);die();
$todayAddSpendData = $this->caculateSpend($pay_time, [], [], 1);
@ -217,9 +203,7 @@ class PromoteController extends BaseController
$today_total_money = $this->pay_total(1, 0, $promoteId);
$this->assign('data', $data);
// $this->assign('yesterdayData',$yesterdayData);
$this->assign('spendData', $spendData);
// $this->assign('yesterdaySpendData', $yesterdaySpendData);
$this->assign('todayAddSpendData', $todayAddSpendData);
$this->assign('mounthAddSpendData', $mounthAddSpendData);
@ -424,6 +408,9 @@ class PromoteController extends BaseController
$promoteIds[] = $promoteId;
$map['promote_id'] = ['IN', $promoteIds];
$map = $this->spendRepository->withIsCheck($map);
if (in_array($type, [1, 2])) {
$whereUser['promote_id'] = $map['promote_id'];
if ($type == 1) {
@ -508,7 +495,7 @@ class PromoteController extends BaseController
}
$where['spend.promote_id'] = array('in', $promoteId);
$where['spend.pay_status'] = 1;
$where['spend.is_check'] = array('NEQ', 2);
$where = $this->spendRepository->withIsCheck($where, 'spend.is_check');
switch ($type) {
case 1:
{ // 今天

@ -17,6 +17,15 @@ use Base\Repository\GameRepository;
*/
class QueryController extends BaseController
{
public $spendRepository;
protected function _initialize()
{
parent::_initialize();
$this->spendRepository = new SpendRepository();
}
public static $payWay = [
-1 => '绑币',
0 => '平台币',
@ -127,6 +136,8 @@ class QueryController extends BaseController
if ($payedBegTime && $payedEndTime) {
$map['tab_spend.payed_time'] = ['between', [$payedBegTime, $payedEndTime - 1]];
}
$map = $this->spendRepository->withIsCheck($map, 'tab_spend.is_check');
$data = [];
$count = 0;
@ -1976,6 +1987,10 @@ class QueryController extends BaseController
$spendMap['_string'] = 'today.user_id = s.user_id and today.game_id = s.game_id and today.server_id = s.server_id and today.game_player_id = s.game_player_id and today.promote_id = s.promote_id';
$spendMap['today.pay_status'] = 1;
$spendMap['today.pay_time'] = ['between', [$nowTime, $nowTimeEnd]];
$map = $this->spendRepository->withIsCheck($map, 's.is_check');
$spendMap = $this->spendRepository->withIsCheck($spendMap, 'today.is_check');
$fieldToday = M('spend', 'tab_')->alias('today')
->field('sum(pay_amount) as recharge_cost_today')
->where($spendMap)
@ -3027,6 +3042,8 @@ class QueryController extends BaseController
$map['a.server_id'] = $serverId;
}
$spendMap = $this->spendRepository->withIsCheck($spendMap);
$spendSubSql = M('spend', 'tab_')->field(['game_id', 'server_id', 'sum(pay_amount) amount'])->where($spendMap)->group('game_id, server_id')->select(false);
$roleSubSql = M('user_play_info', 'tab_')->field(['game_id', 'server_id', 'count(*) count'])->where($roleMap)->group('game_id, server_id')->select(false);

@ -36,19 +36,30 @@
<img src="{:check_logo_is_exist(C('CH_LOGO_BACKSTAGE'),'logo_default.png')}" style="height:40px;margin:0px;">
</div>
<div class="subNavBox">
<a href="{:U('Promote/index')}" class="subNav <if condition='CONTROLLER_NAME eq Promote and ACTION_NAME eq index '>active</if>"> 后台首页 </a>
<a href="{:U('Promote/index')}" class="subNav <?=is_active_class(['Promote'], ['index'])?>"> 后台首页 </a>
<?php if ($loginer['level'] < 4) :?>
<div class="subNav jssubNav"><i class="prev_icon icon_guanli"></i><span>管理中心</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Promote/base_info')}" class="<if condition='CONTROLLER_NAME eq Promote and ACTION_NAME eq base_info '>active</if> ">账户信息</a>-->
<?php
function promote_is_active_class($promoteType)
{
return is_active_class(
['Promote'],
['children', 'addPromote', 'edit_chlid'],
function() use($promoteType) {
return $_GET["promote_type"] == $promoteType;
}
);
}
?>
<?php if (in_array($loginer['level'], [1])):?>
<a href="{:U('Promote/children', ['promote_type' => 0])}" class="<if condition='$_GET["promote_type"]==0 and CONTROLLER_NAME eq Promote and (ACTION_NAME eq children or ACTION_NAME eq addPromote or ACTION_NAME eq edit_chlid) '>active</if> ">部门长管理</a>
<a href="{:U('Promote/children', ['promote_type' => 0])}" class="<?=promote_is_active_class(0)?>">部门长管理</a>
<?php endif;?>
<?php if (in_array($loginer['level'], [1, 2])):?>
<a href="{:U('Promote/children', ['promote_type' => 1])}" class="<if condition='$_GET["promote_type"]==1 and CONTROLLER_NAME eq Promote and (ACTION_NAME eq children or ACTION_NAME eq addPromote or ACTION_NAME eq edit_chlid) '>active</if> ">组长管理</a>
<a href="{:U('Promote/children', ['promote_type' => 1])}" class="<?=promote_is_active_class(1)?>">组长管理</a>
<?php endif;?>
<?php if (in_array($loginer['level'], [1, 2, 3])):?>
<a href="{:U('Promote/children', ['promote_type' => 2])}" class="<if condition='$_GET["promote_type"]==2 and CONTROLLER_NAME eq Promote and (ACTION_NAME eq children or ACTION_NAME eq addPromote or ACTION_NAME eq edit_chlid) '>active</if> ">推广员管理</a>
<a href="{:U('Promote/children', ['promote_type' => 2])}" class="<?=promote_is_active_class(2)?>">推广员管理</a>
<?php endif;?>
</div>
<?php endif;?>
@ -58,101 +69,101 @@
<?php if($isOpenQuery):?>
<div class="subNav jssubNav"><i class="prev_icon icon_shujvi"></i><span>数据管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Query/dailySummary')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq dailySummary '>active</if> ">每日概况</a>
<a href="{:U('Query/summary')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq summary '>active</if> ">数据汇总</a>
<a href="{:U('Query/dailySummary')}" class="<?=is_active_class(['Query'], ['dailySummary'])?>">每日概况</a>
<a href="{:U('Query/summary')}" class="<?=is_active_class(['Query'], ['summary'])?>">数据汇总</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/recharge')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq recharge or ACTION_NAME eq viewSpendDetailed) '>active</if> ">订单查询</a>
<a href="{:U('Query/recharge')}" class="<?=is_active_class(['Query'], ['recharge', 'viewSpendDetailed'])?>">订单查询</a>
<?php endif;?>
<a href="{:U('Query/register')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq register or ACTION_NAME eq viewRole) '>active</if> ">注册明细</a>
<a href="{:U('Query/register')}" class="<?=is_active_class(['Query'], ['register', 'viewRole'])?>">注册明细</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/arpu')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq arpu '>active</if> ">ARPU统计</a>
<a href="{:U('Query/arpu')}" class="<?=is_active_class(['Query'], ['arpu'])?>">ARPU统计</a>
<?php endif;?>
<!-- <a href="{:U('Query/retention_analysis')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq retention_analysis '>active</if> ">留存统计</a> -->
<a href="{:U('Query/userRoles')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq userRoles '>active</if> ">角色查询</a>
<!-- <a href="{:U('Query/retention_analysis')}" class="<?=is_active_class(['Query'], ['retention_analysis'])?>">留存统计</a> -->
<a href="{:U('Query/userRoles')}" class="<?=is_active_class(['Query'], ['userRoles'])?>">角色查询</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/userRecharges')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq userRecharges '>active</if> ">充值玩家</a>
<a href="{:U('Query/userRecharges')}" class="<?=is_active_class(['Query'], ['userRecharges'])?>">充值玩家</a>
<?php endif;?>
<a href="{:U('Query/achievement')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq achievement '>active</if> ">团队/推广员业绩</a>
<!-- <a href="{:U('Query/promoteQuota')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq promoteQuota or ACTION_NAME eq quotaDtl) '>active</if> ">推广员指标</a> -->
<a href="{:U('Query/iosDownLoadData')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq iosDownLoadData or ACTION_NAME eq iosDownLoadData) '>active</if> ">IOS下载数统计</a>
<a href="{:U('Query/userretention')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq userretention) '>active</if> ">用户留存率</a>
<a href="{:U('Query/gameData')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq gameData) '>active</if> ">游戏分区数据汇总</a>
<a href="{:U('Query/achievement')}" class="<?=is_active_class(['Query'], ['achievement'])?>">团队/推广员业绩</a>
<!-- <a href="{:U('Query/promoteQuota')}" class="<?=is_active_class(['Query'], ['promoteQuota', 'quotaDtl'])?>">推广员指标</a> -->
<a href="{:U('Query/iosDownLoadData')}" class="<?=is_active_class(['Query'], ['iosDownLoadData'])?>">IOS下载数统计</a>
<a href="{:U('Query/userretention')}" class="<?=is_active_class(['Query'], ['userretention'])?>">用户留存率</a>
<a href="{:U('Query/gameData')}" class="<?=is_active_class(['Query'], ['gameData'])?>">游戏分区数据汇总</a>
</div>
<?php endif;?>
<?php if ($canViewUserRecharge && $loginer['level'] == 1) :?>
<div class="subNav jssubNav"><i class="prev_icon icon_caiwu"></i><span>财务管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Finance/index')}" class="<if condition='CONTROLLER_NAME eq Finance and ACTION_NAME eq index '>active</if> ">结算中心</a>
<a href="{:U('Finance/settlementDtl')}" class="<if condition='CONTROLLER_NAME eq Finance and ACTION_NAME eq settlementDtl '>active</if> ">结算明细</a>
<a href="{:U('Finance/withdrawRecord')}" class="<if condition='CONTROLLER_NAME eq Finance and (ACTION_NAME eq withdrawRecord or ACTION_NAME eq withdrawDtl or ACTION_NAME eq settlementOrder) '>active</if> ">提现记录</a>
<?php if ($loginer['withdraw_show'] == 1) :?>
<a href="{:U('Withdraw/index')}" class="<if condition='CONTROLLER_NAME eq Withdraw and (ACTION_NAME eq index or ACTION_NAME eq withdrawDetail or ACTION_NAME eq withdrawOrderDetail) '>active</if> ">公司结算</a>
<?php endif;?>
</div>
<a href="{:U('Finance/index')}" class="<?=is_active_class(['Finance'], ['index'])?>">结算中心</a>
<a href="{:U('Finance/settlementDtl')}" class="<?=is_active_class(['Finance'], ['settlementDtl'])?>">结算明细</a>
<a href="{:U('Finance/withdrawRecord')}" class="<?=is_active_class(['Finance'], ['withdrawRecord', 'withdrawDtl', 'settlementOrder'])?>">提现记录</a>
<?php if ($loginer['withdraw_show'] == 1) :?>
<a href="{:U('Withdraw/index')}" class="<?=is_active_class(['Withdraw'], ['index', 'withdrawDetail', 'withdrawOrderDetail'])?>">公司结算</a>
<?php endif;?>
</div>
<?php endif ;?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>游戏管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Game/index')}" class="<if condition='CONTROLLER_NAME eq Game and (ACTION_NAME eq index) '>active</if> ">专服管理</a>
<a href="{:U('Game/index')}" class="<?=is_active_class(['Game'], ['index'])?>">专服管理</a>
<?php if($isOpenQuery):?>
<a href="{:U('Game/mix')}" class="<if condition='CONTROLLER_NAME eq Game and (ACTION_NAME eq mix) '>active</if> ">混服管理</a>
<a href="{:U('Game/mix')}" class="<?=is_active_class(['Game'], ['mix'])?>">混服管理</a>
<if condition="getParentPromoteId(PID) eq 0">
<a href="{:U('GameDivide/index')}" class="<if condition='CONTROLLER_NAME eq GameDivide and (ACTION_NAME eq index ) '>active</if> ">分成比例</a>
<a href="{:U('Promote/setChildGamePermission')}" class="<if condition='CONTROLLER_NAME eq Promote and (ACTION_NAME eq setChildGamePermission ) '>active</if> ">设置</a>
<a href="{:U('GameDivide/index')}" class="<?=is_active_class(['GameDivide'], ['index'])?>">分成比例</a>
<a href="{:U('Promote/setChildGamePermission')}" class="<?=is_active_class(['Promote'], ['setChildGamePermission'])?>">设置</a>
</if>
<a href="{:U('Apply/feature')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq feature or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">资料专区</a>
<a href="{:U('Apply/feature')}" class="<?=is_active_class(['Apply'], ['feature'])?>">资料专区</a>
<?php endif;?>
</div>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>安全管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Safe/bindTel')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq bindTel or ACTION_NAME eq bindTel or ACTION_NAME eq bindTel or ACTION_NAME eq bindTel ) '>active</if> ">短信登陆设置</a>
<a href="{:U('Download/listsIndex')}" class="<if condition='CONTROLLER_NAME eq Download and (ACTION_NAME eq listsIndex or ACTION_NAME eq listsIndex or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyloginpassword or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">修改登录密码</a>
<a href="{:U('Safe/setSafeIndex')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq setSafeIndex or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">设置安全密码</a>
<!--<a href="{:U('Apply/app_index')}" class="<?=is_active_class(['Apply'], ['app_index'])?>">APP列表</a>-->
<a href="{:U('Safe/bindTel')}" class="<?=is_active_class(['Safe'], ['bindTel'])?>">短信登陆设置</a>
<a href="{:U('Download/listsIndex')}" class="<?=is_active_class(['Download'], ['listsIndex'])?>">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<?=is_active_class(['Safe'], ['modifyloginpassword'])?>">修改登录密码</a>
<a href="{:U('Safe/setSafeIndex')}" class="<?=is_active_class(['Safe'], ['setSafeIndex'])?>">设置安全密码</a>
<?php if ($loginer['level'] == 1) :?>
<a href="{:U('Safe/modifyBaseInfo')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyBaseInfo or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">用户基本信息</a>
<a href="{:U('Safe/modifyBaseInfo')}" class="<?=is_active_class(['Safe'], ['modifyBaseInfo'])?>">用户基本信息</a>
<?php endif;?>
<a href="{:U('Safe/promoteLogs')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq promoteLogs or ACTION_NAME eq promoteLogs or ACTION_NAME eq promoteLogs or ACTION_NAME eq promoteLogs ) '>active</if> ">操作日志</a>
<a href="{:U('Safe/promoteLogs')}" class="<?=is_active_class(['Safe'], ['promoteLogs'])?>">操作日志</a>
</div>
<?php if($loginer['level'] <= 2):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>测试资源</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('TestingResource/index')}" class="<if condition='CONTROLLER_NAME eq TestingResource and ACTION_NAME eq index '>active</if> ">测试资源申请</a>
<a href="{:U('TestingResource/batches')}" class="<if condition='CONTROLLER_NAME eq TestingResource and ACTION_NAME eq batches '>active</if> ">测试资源申请记录</a>
<a href="{:U('TestingResource/index')}" class="<?=is_active_class(['TestingResource'], ['index'])?>">测试资源申请</a>
<a href="{:U('TestingResource/batches')}" class="<?=is_active_class(['TestingResource'], ['batches'])?>">测试资源申请记录</a>
</div>
<?php endif;?>
<?php if(C('APP_ENV') == 'dev' || in_array($loginer['company_id'], [334, 370])):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>评级管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<?php if($loginer['level'] <= 2):?>
<a href="{:U('PromoteGrade/settings')}" class="<if condition='CONTROLLER_NAME eq PromoteGrade and (ACTION_NAME eq settings or ACTION_NAME eq setting) '>active</if> ">评级设定</a>
<a href="{:U('PromoteGrade/settings')}" class="<?=is_active_class(['PromoteGrade'], ['settings', 'setting'])?>">评级设定</a>
<?php endif;?>
<a href="{:U('PromoteGrade/index')}" class="<if condition='CONTROLLER_NAME eq PromoteGrade and ACTION_NAME eq index '>active</if> ">团队评级</a>
<a href="{:U('PromoteGrade/index')}" class="<?=is_active_class(['PromoteGrade'], ['index'])?>">团队评级</a>
</div>
<?php endif;?>
<!--<eq name="parent_id" value="0">
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>扶持管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Support/index')}" class="<if condition='CONTROLLER_NAME eq Support and (ACTION_NAME eq index or ACTION_NAME eq add or ACTION_NAME eq apply ) '>active</if> ">扶持申请</a>
<a href="{:U('Support/lists')}" class="<if condition='CONTROLLER_NAME eq Support and ACTION_NAME eq lists '>active</if> ">扶持记录</a>
<a href="{:U('Support/quota')}" class="<if condition='CONTROLLER_NAME eq Support and ACTION_NAME eq quota '>active</if> ">扶持额度</a>
</div>
</eq>-->
<!-- <eq name="parent_id" value="0">
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>扶持管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Support/index')}" class="<?=is_active_class(['Support'], ['add', 'apply'])?>">扶持申请</a>
<a href="{:U('Support/lists')}" class="<?=is_active_class(['Support'], ['lists'])?>">扶持记录</a>
<a href="{:U('Support/quota')}" class="<?=is_active_class(['Support'], ['quota'])?>">扶持额度</a>
</div>
</eq> -->
<!--<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>会长福利</span><i class="arrow_icon"></i></div>-->
<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>平台币管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('PromoteCoin/myCoin')}" class="<if condition='CONTROLLER_NAME eq PromoteCoin and (ACTION_NAME eq myCoin or ACTION_NAME eq coinRecord or ACTION_NAME eq coinRecordDesc) '>active</if> ">我的平台币</a>
<a href="{:U('PromoteCoin/transferLogs')}" class="<if condition='CONTROLLER_NAME eq PromoteCoin and (ACTION_NAME eq shift or ACTION_NAME eq transferLogs) '>active</if> ">平台币转移</a>
<a href="{:U('PromoteCoin/myCoin')}" class="<?=is_active_class(['PromoteCoin'], ['myCoin', 'coinRecord', 'coinRecordDesc'])?>">我的平台币</a>
<a href="{:U('PromoteCoin/transferLogs')}" class="<?=is_active_class(['PromoteCoin'], ['shift', 'transferLogs'])?>">平台币转移</a>
<?php if($loginer['level'] == 1):?>
<a href="{:U('CoinOrder/order_list')}" class="<if condition='CONTROLLER_NAME eq CoinOrder and (ACTION_NAME eq order_list or ACTION_NAME eq order_add or ACTION_NAME eq order_detail) '>active</if> ">平台币充值</a>
<a href="{:U('CoinOrder/order_list')}" class="<?=is_active_class(['CoinOrder'], ['order_list', 'order_add', 'order_detail'])?>">平台币充值</a>
<?php endif;?>
</div>
<?php if($canViewUserRecharge):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>玩家管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Players/playAction')}" class="<if condition='CONTROLLER_NAME eq Players and (ACTION_NAME eq playAction)'>active</if> ">行为日志</a>
<a href="{:U('Players/playAction')}" class="<?=is_active_class(['Players'], ['playAction'])?>">行为日志</a>
</div>
<?php endif;?>
</div>

Loading…
Cancel
Save