Merge branch 'release' of wmtx/platform into master

版本更新
master
廖金灵 4 years ago committed by Gogs
commit a663471854

@ -2576,7 +2576,7 @@ function getCompanyBlongOther($id = -1)
* array(
* op_type=>操作类型 0:新增1:编辑 2:删除 3:下载,
* op_name=>操作说明 例如:编辑,删除,锁定等,
* url=>需要跳转的url 添加去列表加唯一id编辑直接去编辑页面下载可以重新下载(新开页面),
* url=>U函数可以跳转 的操作地址,
* key=>关键词:用户的账号,游戏的名词等,
* menu=>非必须,菜单目录,不存在的话按控制器寻找。
* )

@ -1135,6 +1135,11 @@ class ExportController extends Controller
unset($_REQUEST['pay_way']);
}
if (isset($_REQUEST['is_check'])) {
$map['is_check'] = (int)($_REQUEST['is_check']);
unset($_REQUEST['is_check']);
}
if ($_REQUEST['merchant_id']) {
$map['merchant_id'] = $_REQUEST['merchant_id'];
unset($_REQUEST['merchant_id']);
@ -1229,6 +1234,7 @@ class ExportController extends Controller
'pay_way' => '充值方式',
'pay_status' => L('Order_status'),
'pay_game_status' => '游戏通知状态',
'is_check' => '是否参与结算',
'promote_id' => "消费"."{$total}",
];
@ -1304,6 +1310,8 @@ class ExportController extends Controller
$value['sdk_version'] = $value['sdk_version'] == 1 ? "安卓" : "苹果";
$value['game_id'] = $thisGameInfo['partner_name'];
$value['is_check'] = D("Spend")::IsCheckStr[$value['is_check']];
$value['company_name'] = $promoters[$value['promote_id']] == 0 ? '官方渠道' : ($companys[$promoters[$value['promote_id']]] ?? '');
unset($value['promote_id']);
$value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']);

@ -282,6 +282,7 @@ class FinancePromoteController extends AdminController
$map['s.market_admin_id'] = $adminId;
}
$map['s.pay_status']=1;
$map['s.is_check']=1;
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
@ -511,6 +512,7 @@ class FinancePromoteController extends AdminController
$map['s.market_admin_id'] = $adminId;
}
$map['s.pay_status']=1;
$map['s.is_check']=1;
// dd($map);
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
@ -775,6 +777,8 @@ class FinancePromoteController extends AdminController
$row = 10;
}
$map['pay_status'] = 1;
$map['is_check'] = 1;
if (!empty(I("game_id"))) {
$map['game_id'] = I("game_id");
}
@ -893,6 +897,7 @@ class FinancePromoteController extends AdminController
}
$map['s.pay_status']=1;
$map['s.is_check']=1;
$query = M("spend","tab_")->alias("s")
->field("s.game_id,s.game_name,s.sdk_version,p.partner as partner_name,
SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
@ -946,7 +951,7 @@ class FinancePromoteController extends AdminController
->join("tab_promote promote ON s.promote_id = promote.id","left")
->join("tab_promote_company company ON promote.company_id = company.id","left");
}
$data = $query->where(['s.pay_status' => 1])
$data = $query->where(['s.pay_status' => 1,'s.is_check'=>1])
->where($map)
->find();
return $data;
@ -996,6 +1001,7 @@ class FinancePromoteController extends AdminController
$row = 10;
}
$map['pay_status'] = 1;
$map['is_check'] = 1;
if (!empty(I('user_account'))) {
$map['tab_spend.user_account'] = array('like','%'.I("user_account").'%');

@ -1335,6 +1335,9 @@ class PromoteCompanyController extends ThinkController
$is_change_game = false;
$Promote = M("Promote", "tab_");
if($old_info['game_ids'] != $game_ids){
//操作日志
$this->addCompanyGameChangeLog($company_id,$old_info['game_ids'],$game_ids);
if($old_info['company_belong'] == 1 || $old_info['company_belong'] == 2){
//外团跟随公司
$new_game_ids = D("Game")->changeRelationGameidToGameid($game_ids,true);
@ -1374,6 +1377,20 @@ class PromoteCompanyController extends ThinkController
}
}
}
protected function addCompanyGameChangeLog($company_id,$old_game_ids,$new_game_ids){
$old_game_ids = explode(',',$old_game_ids);
$new_game_ids = explode(',',$new_game_ids);
$addGameid = array_diff($new_game_ids,$old_game_ids);
$removeGameid = array_diff($old_game_ids,$new_game_ids);
if(!empty($addGameid)){
$gameid = implode(',',$addGameid);
addOperationLog(['op_type'=>1,'key'=>"addCompanyGame","op_name"=>"新增推广游戏","content"=>json_encode(["company_id"=>$company_id,"relation_game_id"=>$gameid])]);
}
if(!empty($removeGameid)){
$gameid = implode(',',$removeGameid);
addOperationLog(['op_type'=>1,'key'=>"removeCompanyGame","op_name"=>"移除推广游戏","content"=>json_encode(["company_id"=>$company_id,"relation_game_id"=>$gameid])]);
}
}
/**
* 由于修改公司信息引起的会长信息修改
* @param [type] $save

@ -11,6 +11,7 @@ use User\Api\UserApi as UserApi;
class SpendController extends ThinkController
{
const model_name = 'Spend';
public $OpAuthList;
public function lists()
{
@ -24,6 +25,10 @@ class SpendController extends ThinkController
unset($_REQUEST['timestart']);
unset($_REQUEST['timeend']);
if (isset($_REQUEST['is_check'])) {
$map['is_check'] = (int)($_REQUEST['is_check']);
}
if (isset($_REQUEST['user_account'])) {
$map['user_account'] = array('like', trim($_REQUEST['user_account']));
unset($_REQUEST['user_account']);
@ -142,13 +147,13 @@ class SpendController extends ThinkController
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
$adminUsernameList = getAdminUsernameList(array_column($data['data'], 'market_admin_id'));
foreach ($data['data'] as $key=>&$value ) {
($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):'';
$value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
$value['is_check_str'] = D(self::model_name)::IsCheckStr[$value['is_check']];
}
$this->assign('showMarketAdmin', session('user_auth')['show_market_admin']);
$this->assign('showPromote', session('user_auth')['show_promote']);
$this->assign('isMarketAdmin', $isMarketAdmin);
@ -159,16 +164,72 @@ class SpendController extends ThinkController
$this->assign('_page', $data['page']);
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
if(!IS_ROOT){
$this->OpAuthList= getModuleControllerAuth();
}
$this->assign('menubtn',$this->menuAuth());
$this->display();
}
/**
* 充值补单功能
*/
public function order_repair() {
if (IS_AJAX) {
protected function menuAuth()
{
$mentBtn = [
"addStatement"=>"<a class='butn' id='addStatement'>参与结算</a>",
"removeStatement"=>"<a class='butn' id='removeStatement' style='background-color: red;'>移出结算</a>",
];
$resarr = [];
foreach ($mentBtn as $k => $v) {
if(IS_ROOT){
$resarr[] = $v;
}else{
if(in_array($k,$this->OpAuthList)){
$resarr[] = $v;
}
}
}
return $resarr;
}
public function addStatement()
{
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$this->editOrderIscheck($ids,2,1);
$this->ajaxReturn(array(
'status' => 1,
"info"=>"操作成功"
));
}
public function removeStatement()
{
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$this->editOrderIscheck($ids,1,2);
$this->ajaxReturn(array(
'status' => 1,
"info"=>"操作成功"
));
}
protected function editOrderIscheck($ids,$oldval,$newval){
$dbres = D(self::model_name)->where("id in ({$ids}) and is_check = '{$oldval}'")->select();
if(empty($dbres)) return false;
$changeIds = implode(",",array_column($dbres,"id"));
//执行操作
$res = D(self::model_name)->where("id in ({$changeIds}) and is_check = '{$oldval}'")->save(['is_check'=>$newval]);
if(empty($res)) return false;
//日志
if($newval == 1){
$op_name = "加入结算";
$key = "addStatement";
}else{
$op_name = "移出结算";
$key = "removeStatement";
}
addOperationLog(['op_type'=>1,'key'=>$key,"op_name"=>$op_name,"content"=>json_encode(["ids"=>$_REQUEST['ids'],"is_check"=>$newval])]);
return true;
}
}

@ -22,6 +22,10 @@ class SpendModel extends Model
/* 自动验证规则 */
protected $_validate = array();
const IsCheckStr=[
"1"=>"是",
"2"=>"否"
];
/* 自动完成规则 */
protected $_auto = array(

@ -81,7 +81,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">公会统计</h3>
<p class="description_text">说明:公会相关统计</p>
<p class="description_text">说明:公会相关统计<span style="color: red;margin-left: 10px;">不含不参与结算的订单数据</span></p>
</div>
<style>

@ -25,12 +25,40 @@
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
tr td:nth-child(2){
tr td:nth-child(3){
max-width: 200px;
word-wrap:break-word;
line-height: 1.5;
padding:5px;
}
.search_list{
margin-bottom: 15px;
}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
.data_list table td{
line-height: 2;
}
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
</style>
<!-- 标题栏 -->
@ -158,6 +186,16 @@
</volist>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select id="is_check" name="is_check" class="select_gallery">
<option value="">是否参与结算</option>
<option value="1"></option>
<option value="2"></option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list search_item">
@ -166,7 +204,13 @@
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<foreach name="menubtn" item="vo" >
{$vo}
</foreach>
</div>
</div>
@ -177,6 +221,7 @@
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>支付订单号</th>
<th style="max-width: 100px;">CP订单号</th>
<th><a class="paixu" data-order='pay_time'>
@ -206,16 +251,18 @@
<th>充值方式</th>
<th>订单状态</th>
<th>游戏通知状态</th>
<th>是否参与结算</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name="list_data">
<td colspan="19" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="22" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>
<td ><input class="ids" type="checkbox" data-ischeck="{$data.is_check}" value="{$data['id']}" name="ids[]"></td>
<td>
<if condition="$show_data_power eq true ">
{$data.pay_order_number}
@ -295,6 +342,7 @@
{:get_info_status($data['pay_game_status'],14)}
</if>
</td>
<td>{$data.is_check_str}</td>
<td style="text-indent:0;">
<?php
@ -326,8 +374,8 @@
<if condition="$rule_count_check">
<tr class="data_summary">
<td>汇总</td>
<td colspan="19">
<td colspan="2">汇总</td>
<td colspan="20">
当页充值:{:null_to_0(array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount')))}
<!-- 今日充值:{$ttotal}-->
<!-- 昨日充值:{$ytotal}-->
@ -670,6 +718,63 @@
});
$("#game_name").change();
$("#addStatement,#removeStatement").on("click",function(){
var id = $(this).attr("id");
if(id == "addStatement"){
var opname = "参与结算";
var opurl = "{:U('addStatement')}";
var opst ="[不参与结算]";
var status = [2];
}else if(id=="removeStatement"){
var opname = "移出结算";
var opurl = "{:U('removeStatement')}";
var opst ="[参与结算]";
var status = [1];
}
var flag = false;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
const ischeck = $(elem).data("ischeck");
if($.inArray(ischeck,status) > -1){
return $(elem).val();
}
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>" + '无需要'+opname+'的操作,仅'+opst+'状态可以进行'+opname+"</font>");
return;
}
text = text.join(",");
layer.confirm('【提示】'+opname+'操作后,相应的结算单需要进行重算后生效', {
btn: ['确认','取消'],
title:false
}, function(index){
layer.close(index);
layer.load(2);
$.ajax({
type: "POST",
url: opurl,
dataType: 'json',
async: true,
data: {ids:text},
success:function(data){
layer.closeAll('loading');
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
});
})
/**
* 初始化select2单选默认带搜索功能。
*/

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

@ -8,6 +8,7 @@ use Base\Model\UserModel;
use Base\Tool\IdCard;
use Base\Tool\Registry;
use Think\Model;
use Base\Repository\SpendRepository;
class PromoteService {
@ -338,7 +339,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;
@ -1233,6 +1234,27 @@ class PromoteService {
}
}
/**
* 推广员所属公会历史所有推广过的游戏ID
* @todo 如果没有用户充值则该游戏ID不会显示
*/
public function getHistoryGameIds($promote)
{
$topPromote = $this->getTopPromote($promote);
$spendRepository = new SpendRepository();
$map = [];
$map['_string'] = ' promote_id in(' . $this->subInSql($topPromote) . ')';
$map = $spendRepository->withIsCheck($map);
$historyGameIds = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->getField('game_id', true);
if (!$historyGameIds) {
$historyGameIds = [];
}
$nowGameIds = $topPromote['game_ids'] == '' ? [] : explode(',', $topPromote['game_ids']);
return array_unique(array_merge($historyGameIds, $nowGameIds));
}
public function checkPromoteLimitRule($promote)
{
$topPromote = $this->getTopPromote($promote);

@ -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);
@ -2267,92 +2279,64 @@ class DownloadController extends BaseController {
* 数据汇总添加下载
* @author sunke
*/
public function summary_data_export() {
$promoteId = I('promote_id',0);
$teamLeaderId = I('team_leader_id',0);
$own_id = I('own_id',0);
$relation_game_id = I('relation_game_id',0);
$sdk_version = I('sdk_version',0);
$begtime = I('begtime','');
$endtime = I('endtime','');
// $childPromoteIds = getAllChildPromoteList(3);
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_apply.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_apply.promote_id'] = ['in', $childPromoteIds];
}
public function summary_data_export()
{
$ownId = intval(I('own_id'), 0);//本账号
$relationGameId = intval(I('relation_game_id', 0));
$sdkVersion = intval(I('sdk_version', 0));
$serverId = I('server_id', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$map2[] = [
'_logic' => 'or',
'id' => $queryPromote['id'],
'chain' => ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']
];
$ids = M('promote', 'tab_')->where($map2)->getField('id', true);
if(empty($ids)) {
$ids = array();
}
if(empty($levelPromote)) {
array_push($ids,PID);
}
// array_push($ids,$queryPromote['id']);
if (!empty($ids)) {
$map['tab_apply.promote_id'] = ['in',$ids];
}else {
$map['_string'] = '1<>1';
}
if (!empty($own_id)) {
if (!empty($map['_string'])) {
unset($map['_string']);
}
$map['tab_apply.promote_id'] = $queryPromote['id'];//本账号
$loginPromote = $this->getLoginPromote();
$params = [];
$map = [];
$map = ['_string' => '1=1'];
if ($ownId) {
$params['promote_ids'] = $queryPromote['id'];
} else {
$subMap['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($subMap)->getField('id', true);
$ids[] = $queryPromote['id'];
$params['promote_ids'] = $ids;
}
empty($relation_game_id) || $map['tab_game.relation_game_id'] = $relation_game_id;
empty($sdk_version) || $map['tab_game.sdk_version'] = $sdk_version;
if(empty($begtime) && empty($endtime)) {
$nowTime = date('Y-m-d');
$begtime1 = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$endtime1 = $nowTime;
$map["apply_time"] = ["between",[strtotime($begtime1),strtotime($endtime1) + 3600*24]];
if ($relationGameId > 0) {
$map['relation_game_id'] = $relationGameId;
}
if(!empty($begtime) && !empty($endtime)) {
$map["apply_time"] = ["between",[strtotime($begtime),strtotime($endtime) + 3600 * 24]];
if ($sdkVersion > 0) {
$map['sdk_version'] = $sdkVersion;
}
$serverField = '';
$serverJoin = '';
if (!empty(I('server_id'))) {
$map['tab_server.id'] = I('server_id');
if (!empty($serverId)) {
$params['server_id'] = $serverId;
}
$conditions = json_encode($map,TRUE);
$addtime = time();
$data = [
'logid' => 'hz_'.time(),
'promote_id' => PID,
'type' => '/Home/Query/summary',
'dataname' => '数据汇总数据',
'status' => 0,
'addtime' => $addtime,
'begintime' => 0,
'content' => '',
'conditions' =>$conditions
];
$res = M('downloadlog','tab_')->add($data);
if (!$res) {
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime - 1;
$conditions = json_encode(['map' => $map, 'params' => $params], true);
$addtime = time();
$data = [
'logid' => 'hz_'.time(),
'promote_id' => PID,
'type' => '/Home/Query/summary',
'dataname' => '数据汇总数据',
'status' => 0,
'addtime' => $addtime,
'begintime' => 0,
'content' => '',
'conditions' =>$conditions
];
$res = M('downloadlog','tab_')->add($data);
if (!$res) {
// $this->ajaxReturn(array("status" => -1, "msg" => "添加导出日志失败", 'ret' => $res));
$this->error('添加下载失败');
}
@ -3184,7 +3168,7 @@ public function iosDetailExcelInfo($id,$map) {
}
//数据汇总excel信息
public function summaryExcelInfo($id,$map) {
public function summaryExcelInfo($id, $map) {
$xlsName = "数据汇总";
$xlsCell = array(
array('game_name','游戏名称'),
@ -3207,51 +3191,26 @@ public function iosDetailExcelInfo($id,$map) {
$xlsCell[] = array('spend_discount','折扣币充值');
$xlsCell[] = array('spend_voucher','代金券使用');
}
if(!empty($map['tab_apply.promote_id'][1])) {
$params['promote_ids'] = $map['tab_apply.promote_id'][1];
$loginPromote = $this->getLoginPromote();
$map = json_decode(json_encode($map), true);
$gameMap = $map['map'];
$params = $map['params'];
$promoteService = new PromoteService();
$allGameIs = $promoteService->getHistoryGameIds($loginPromote);
if ($allGameIs && count($allGameIs) > 0) {
$gameMap['_string'] .= ' and id in(' . implode(',', $allGameIs) . ')';
} else {
$gameMap['_string'] .= '1=0';
}
$serverJoin = '';
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime -1;
if(!empty($map['apply_time'][1])) {
$begTime = $map['apply_time'][1][0];
$endTime = $map['apply_time'][1][1];
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime -1;
unset($map['apply_time']);
}
if(!empty($map['tab_server.server_id'])) {
$serverJoin = 'tab_server on tab_server.game_id = tab_apply.game_id';
$params['server_id'] = $map['tab_server.server_id'];
}
$data = M('Apply', 'tab_')
->field('tab_apply.game_id,tab_apply.game_name,tab_apply.sdk_version')
->join('tab_game as g on g.id = tab_apply.game_id')
->join($serverJoin)//关联区服表
->where($map)
->group('tab_apply.game_id')
->order('g.sort desc,g.id desc')
->select();
$allGameIs = M('Apply', 'tab_')
->field('distinct tab_apply.game_id')
->join('tab_game as g on g.id = tab_apply.game_id')
->join($serverJoin)
->where($map)
->select();
$allGameIs = array_column($allGameIs, 'game_id');
$data = M('game', 'tab_')->where($gameMap)->order('sort desc,id desc')->select();
$records = [];
if (!empty($data)) {
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$gameIds = [];
foreach ($data as $list) {
$gameIds[] = $list['game_id'];
}
$gameIds = array_column($data, 'id');
$params['game_ids'] = $gameIds;
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
@ -3261,36 +3220,43 @@ public function iosDetailExcelInfo($id,$map) {
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
$newIpNumList = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
$loginUserNumList = $userRepository->getLoginCountGroupByGame($params);//登录用户数
$spendUserNumList = $spendRepository->getPayUserCountGroupByGame($params);//充值人数
$spendNumList = $spendRepository->getPayCountGroupByGame($params);//充值次数
$spendAllAmountList = $spendRepository->getPayAmountGroupByGameAndType($params);//充值总额
$params['pay_way'] = ['in', '1,2,3,4,5,6'];
$spendCashList = $spendRepository->getPayAmountGroupByGameAndType($params);//现金充值
$params['pay_way'] = 0;
$spendGenericList = $spendRepository->getPayAmountGroupByGameAndType($params);//通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params);//绑定币充值
foreach ($data as &$list) {
if ($this->canViewUserRecharge) {
$spendUserNumList = $spendRepository->getPayUserCountGroupByGame($params);//充值人数
$spendNumList = $spendRepository->getPayCountGroupByGame($params);//充值次数
$spendAllAmountList = $spendRepository->getPayAmountGroupByGameAndType($params);//充值总额
$params['pay_way'] = ['in', '1,2,3,4,5,6'];
$spendCashList = $spendRepository->getPayAmountGroupByGameAndType($params);//现金充值
$params['pay_way'] = 0;
$spendGenericList = $spendRepository->getPayAmountGroupByGameAndType($params);//通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params);//绑定币充值
}
foreach ($data as $list) {
$gameId = $list['game_id'];
$records[] = [
$record = [
'game_id' => $gameId,
'game_name' => $list['game_name'],
'sdk_version' => $list['sdk_version'],
'role_num' => $roleNumList[$gameId],
'user_num' => $userNumList[$gameId],
'new_user_num' => $newUserNumList[$gameId],
'new_device_num' => $newDeviceNumList[$gameId],
'new_ip_num' => $newIpNumList[$gameId],
'login_user_num' => $loginUserNumList[$gameId],
'spend_user_num' => $spendUserNumList[$gameId],
'spend_num' => $spendNumList[$gameId],
'spend_all_amount' => $spendAllAmountList[$gameId],
'spend_cash' => $spendCashList[$gameId],
'spend_generic' => $spendGenericList[$gameId],
'spend_binding' => $spendBindingList[$gameId],
'spend_discount' => 0,
'spend_voucher' => 0,
'sdk_version' => $list['sdk_version'] == 1 ? '安卓' : '苹果',
'role_num' => intval($roleNumList[$gameId]),
'user_num' => intval($userNumList[$gameId]),
'new_user_num' => intval($newUserNumList[$gameId]),
'new_device_num' => intval($newDeviceNumList[$gameId]),
'new_ip_num' => intval($newIpNumList[$gameId]),
'login_user_num' => intval($loginUserNumList[$gameId]),
];
if ($this->canViewUserRecharge) {
if ($this->canViewUserRecharge) {
$record['spend_user_num'] = intval($spendUserNumList[$gameId]);
$record['spend_num'] = intval($spendNumList[$gameId]);
$record['spend_all_amount'] = $spendAllAmountList[$gameId];
$record['spend_cash'] = $spendCashList[$gameId];
$record['spend_generic'] = $spendGenericList[$gameId];
$record['spend_binding'] = $spendBindingList[$gameId];
$record['spend_discount'] = 0;
$record['spend_voucher'] = 0;
}
}
$records[] = $record;
}
$params['all_data'] = 1;
$params['game_ids'] = $allGameIs;
@ -3304,14 +3270,6 @@ public function iosDetailExcelInfo($id,$map) {
$allData['login_user_num'] = $userRepository->getLoginCountGroupByGame($params);//登录用户数
if($this->canViewUserRecharge) {
$record['spend_user_num'] = $spendUserNumList[$gameId];
$record['spend_num'] = $spendNumList[$gameId];
$record['spend_all_amount'] = $spendAllAmountList[$gameId];
$record['spend_cash'] = $spendCashList[$gameId];
$record['spend_generic'] = $spendGenericList[$gameId];
$record['spend_binding'] = $spendBindingList[$gameId];
$record['spend_discount'] = 0;
$record['spend_voucher'] = 0;
$allData['spend_user_num'] = $spendRepository->getPayUserCountByGame($params);//充值人数
$allData['spend_num'] = $spendRepository->getPayCountByGame($params);//充值次数
unset($params['pay_way']);
@ -3326,24 +3284,10 @@ public function iosDetailExcelInfo($id,$map) {
$allData['spend_voucher'] = '0.00';
}
$records[] = $record;
$records[] = $allData;
}
}
$xlsData = [];
foreach ($records as $key1 => $value1) {
if($value1["sdk_version"] == 1) {
$value1["sdk_version"] = "安卓";
}
if($value1["sdk_version"] == 2) {
$value1["sdk_version"] = "苹果";
}
$xlsData[] = $value1;
}
$this->exportExcel($xlsName, $xlsCell, $xlsData,$id);
$this->exportExcel($xlsName, $xlsCell, $records,$id);
}
/*
@ -4476,6 +4420,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;
@ -1291,61 +1302,44 @@ class QueryController extends BaseController
$loginPromote = $this->getLoginPromote();
$map = [];
$map = ['_string' => '1=1'];
if ($ownId) {
$map['a.promote_id'] = $queryPromote['id'];
$params['promote_ids'] = $queryPromote['id'];
} else {
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$subMap['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($subMap)->getField('id', true);
$ids[] = $queryPromote['id'];
$map = [];
$map['a.promote_id'] = ['in', $ids];
$params['promote_ids'] = $ids;
}
if ($relationGameId > 0) {
$map['g.relation_game_id'] = $relationGameId;
$map['relation_game_id'] = $relationGameId;
}
if ($sdkVersion > 0) {
$map['a.sdk_version'] = $sdkVersion;
$map['sdk_version'] = $sdkVersion;
}
$serverJoin = '';
if (!empty($serverId)) {
$serverJoin = 'tab_server as s on s.game_id = a.game_id';
$map['s.server_id'] = $serverId;
$params['server_id'] = $serverId;
}
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime - 1;
$data = M('Apply', 'tab_')->alias('a')
->field('a.game_id,a.game_name,a.sdk_version')
->join('tab_game as g on g.id = a.game_id')
->join($serverJoin)
->where($map)
->group('a.game_id')
->order('g.sort desc,g.id desc')
->page($page, $row)
->select();
$count = M('Apply', 'tab_')->alias('a')
->join('tab_game as g on g.id = a.game_id')
->join($serverJoin)
->where($map)
->count('distinct a.game_id');
$allGameIs = M('Apply', 'tab_')->alias('a')
->field('distinct a.game_id')
->join('tab_game as g on g.id = a.game_id')
->join($serverJoin)
->where($map)
->select();
$allGameIs = array_column($allGameIs, 'game_id');
$promoteService = new PromoteService();
$allGameIs = $promoteService->getHistoryGameIds($loginPromote);
if ($allGameIs && count($allGameIs) > 0) {
$map['_string'] .= ' and id in(' . implode(',', $allGameIs) . ')';
} else {
$map['_string'] .= '1=0';
}
$data = M('game', 'tab_')->where($map)->order('sort desc,id desc')->page($page, $row)->select();
$count = M('game', 'tab_')->where($map)->count();
$records = [];
$allData = [];
if (!empty($data)) {
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$gameIds = array_column($data, 'game_id');
$gameIds = array_column($data, 'id');
$params['game_ids'] = $gameIds;
$userRepository = new UserRepository();
@ -1367,7 +1361,7 @@ class QueryController extends BaseController
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params);//绑定币充值
}
foreach ($data as &$list) {
foreach ($data as $list) {
$gameId = $list['game_id'];
$record = [
'game_id' => $gameId,
@ -1976,6 +1970,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 +3025,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="{$siteConfig['logo']}" 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>

@ -174,14 +174,14 @@
<tr class="num2">
<td>{$vo.game_name}</td>
<td>{:getSDKTypeName($vo['sdk_version'],true)}</td>
<td>{$vo.role_num}</td>
<td>{$vo.user_num}</td>
<td>{$vo.new_user_num}|{$vo.new_device_num}</td>
<td>{$vo.new_ip_num}</td>
<td>{$vo.login_user_num}</td>
<td><?=intval($vo['role_num'])?></td>
<td><?=intval($vo['user_num'])?></td>
<td><?=intval($vo['new_user_num']).'|'.intval($vo['new_device_num'])?></td>
<td><?=intval($vo['new_ip_num'])?></td>
<td><?=intval($vo['login_user_num'])?></td>
<?php if ($canViewUserRecharge) :?>
<td>{$vo.spend_user_num}</td>
<td>{$vo.spend_num}</td>
<td><?=intval($vo['spend_user_num'])?></td>
<td><?=intval($vo['spend_num'])?></td>
<td>{$vo.spend_all_amount|default=0}</td>
<td class="spend-element th-hide">{$vo.spend_cash|default=0}</td>
<td class="spend-element th-hide">{$vo.spend_generic|default=0}</td>

Loading…
Cancel
Save