master
ELF 5 years ago
parent a153fb9a0e
commit 5f5a6ee1af

@ -2469,5 +2469,94 @@ function getAvailableBalance($promote_id=0,$game_id=0,$server_id='') {
}
function getMarketGroupIds()
{
return ['11', '12'];
}
function getMarketAdmins()
{
$ids = getMarketGroupIds();
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => ['in', $ids]])->getField('uid', true);
return M('ucenter_member', 'sys_')->where(['id' => ['in', $adminIds]])->select();
}
function getMarketAdminsByPromoteIds($promoteIds)
{
$promotes = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => ['in', $promoteIds]])->select();
$resultMap = [];
foreach ($promotes as $promote) {
if ($promote['chain'] == '/') {
$resultMap[$promote['id']] = ['top_id' => $promote['id']];
} else {
$item = explode('/', trim($promote['chain'], '/'));
$resultMap[$promote['id']] = ['top_id' => $item[0]];
}
}
if (count($promotes) == 0) {
return [];
}
$topPromotes = M('promote', 'tab_')->field(['id', 'admin_id'])->where(['id' => ['in', array_column($resultMap, 'top_id')]])->select();
$topAdminMap = [];
foreach ($topPromotes as $topPromote) {
$topAdminMap[$topPromote['id']] = $topPromote['admin_id'];
}
$admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select();
$admins = index_by_column('id', $admins);
foreach ($resultMap as &$row) {
$adminId = $topAdminMap[$row['top_id']] ?? 0;
$admin = $admins[$adminId] ?? null;
$row['admin'] = $admin;
}
return $resultMap;
}
function getAdminUsernameList(array $ids)
{
if (count($ids) == 0) {
return [];
}
$admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $ids]])->select();
$items = [];
foreach ($admins as $admin) {
$items[$admin['id']] = $admin['username'];
}
return $items;
}
?>
function isMarketAdmin()
{
$ids = getMarketGroupIds();
$userAuth = session('user_auth');
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => ['in', $ids]])->getField('uid', true);
return in_array($userAuth['uid'], $adminIds);
}
function getPromoteIdsByTopIds($ids)
{
if (count($ids) == 0) {
return [];
}
$idsExp = implode(',', $ids);
$map = array();
$where['SUBSTRING_INDEX(SUBSTRING_INDEX(`chain`,"/",2),"/",-1)'] = array('exp',"IN({$idsExp})");
$where['id'] = array('in', $ids);//会长本身
$where['_logic'] = 'or';
$map['_complex'] = $where;
$result = M('promote', 'tab_')->field('id')->where($map)->getField('id', true);
return $result;
}
function getCompanyDevelopTypes()
{
return [
1 => '自主开发',
2 => '自主开发及维护',
3 => '只维护'
];
}
function getCompanyDevelopTypeText($type)
{
return getCompanyDevelopTypes()[$type] ?? '无';
}

@ -11,6 +11,7 @@ use Base\Service\PromoteService;
use GuzzleHttp\Client;
use think\Db;
use Base\Task\Task;
use Base\Service\MarketService;
class ConsoleController extends Think {
@ -124,8 +125,11 @@ class ConsoleController extends Think {
{
$marketService = new MarketService();
$promoteService = new PromoteService();
$promotes = M('promote', 'tab_')->where(['level' => ['gt', 1], 'admin_id' => ['gt', 0], 'company_belong' => ['in', [1, 2]]])->select();
$promotes = M('promote', 'tab_')->field(['id', 'admin_id', 'account', 'chain', 'level'])
->where(['level' => 1, 'admin_id' => ['gt', 0], 'company_belong' => ['in', [1, 2]]])
->select();
foreach ($promotes as $promote) {
Printer::export('处理会长: ' . $promote['account']);
$subPromotes = $promoteService->getAllChildren($promote, 0, ['id']);
$promoteIds = [$promote['id']];
$promoteIds = array_merge(array_column($subPromotes, 'id'), $promoteIds);

@ -76,6 +76,21 @@ class FinancePromoteController extends AdminController
$nwtflag = false;
}
}
if(isset($_REQUEST['admin_id'])){
if($_REQUEST['admin_id']!=0){
$nwtflag = false;
}
}
if(isset($_REQUEST['admin_id'])){
if($_REQUEST['admin_id']!=0){
$nwtflag = false;
}
}
if(isset($_REQUEST['develop_type'])){
if($_REQUEST['develop_type']!=0){
$nwtflag = false;
}
}
if (isset($_REQUEST['promote_id'])) {
if($_REQUEST['promote_id'] == 0){
$gfidlag = true;
@ -110,7 +125,14 @@ class FinancePromoteController extends AdminController
"bind_coin_count"=>0,
"inside_cash_count"=>0,
);
$promotes = [];
if (count($senddata) > 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account', 'admin_id'])->where(['id' => ['in', array_column($senddata, 'p_id')]])->select();
}
$promotes = index_by_column('id', $promotes);
$adminUsernames = getAdminUsernameList(array_column($promotes, 'admin_id'));
foreach($senddata as $k=>$v){
$promote = $promotes[$v['p_id']] ?? null;
$v['company_belong'] = $v['company_belong'] ?:0;
$v['company_belong'] = getCompanyBlong($v['company_belong']);
if(empty($v['company_name'])) $v['company_name']= $this->COMPANY_NAME;
@ -119,8 +141,10 @@ class FinancePromoteController extends AdminController
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
$v['promote_account'] = get_promote_name($v['p_id']);
$v['promote_account'] = $v['p_id'] == 0 ? '官方渠道' : ($promote ? $promote['account'] : '');
$v['admin_username'] = $adminUsernames[$promote['admin_id']] ?? '无';
$v['develop_type_text'] = getCompanyDevelopTypeText($v['develop_type']);
$v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.','');
$v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.','');
$count['cash_count'] += $v['cash_count'];
@ -208,6 +232,13 @@ class FinancePromoteController extends AdminController
$map['promote.company_belong'] = $_REQUEST['company_belong'];
}
if (!empty(I('develop_type'))) {
$map['company.develop_type'] = I('develop_type');
}
if (!empty(I('admin_id'))) {
$map['promote.admin_id'] = I('admin_id');
}
if($type == "spend"){
@ -222,7 +253,7 @@ class FinancePromoteController extends AdminController
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,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_id,0) company_id,company_name,IFNULL(promote.company_belong,0) company_belong";
IFNULL(company_id,0) company_id,company_name,develop_type,IFNULL(promote.company_belong,0) company_belong";
return M()
->table("tab_spend s use index(promote_time)")
->field($field)
@ -319,8 +350,18 @@ class FinancePromoteController extends AdminController
"bind_coin_count"=>0,
"inside_cash_count"=>0,
);
foreach($senddata as $k=>$v){
$promotes = [];
if (count($senddata) > 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account', 'admin_id'])->where(['id' => ['in', array_column($senddata, 'promote_id')]])->select();
}
$promotes = index_by_column('id', $promotes);
$adminUsernames = getAdminUsernameList(array_column($promotes, 'admin_id'));
foreach($senddata as $k=>$v){
$promote = $promotes[$v['promote_id']] ?? null;
$v['admin_username'] = $adminUsernames[$promote['admin_id']] ?? '无';
$v['develop_type_text'] = getCompanyDevelopTypeText($v['develop_type']);
$v['company_belong'] = getCompanyBlong($v['company_belong']);
if(empty($v['company_name'])) $v['company_name']= $this->COMPANY_NAME;
if(empty($v['promote_account'])) $v['promote_account']= "官方渠道";
@ -391,7 +432,7 @@ class FinancePromoteController extends AdminController
$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,
IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account,IFNULL(promote.company_belong,0) company_belong";
IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account,develop_type,IFNULL(promote.company_belong,0) company_belong";
return M()
->table("tab_spend s use index(promote_time)")
->field($field)
@ -439,6 +480,12 @@ class FinancePromoteController extends AdminController
} elseif (isset($_REQUEST['time_end'])) {
$map['s.pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
}
if (!empty(I('develop_type'))) {
$map['develop_type'] = I('develop_type');
}
if (!empty(I('admin_id'))) {
$map['admin_id'] = I('admin_id');
}
//获取推广员
$title = '';
@ -454,13 +501,24 @@ class FinancePromoteController extends AdminController
}else {
$data =self::gameStatisticsData($map, $row, $p);
}
$promotes = [];
if (count($data) > 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account', 'admin_id'])->where(['id' => ['in', array_column($data, 'p_id')]])->select();
}
$promotes = index_by_column('id', $promotes);
$adminUsernames = getAdminUsernameList(array_column($promotes, 'admin_id'));
foreach ($data as $key => &$value) {
$promote = $promotes[$value['p_id']] ?? null;
$value['cash_count']?:0;
$value['balance_coin_count']?:0;
$value['inside_cash_count']?:0;
$value['all_cash_count'] = number_format($value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'],2,'.','');
$value['company_belong'] =getCompanyBlong($value['company_belong']);
$value['admin_username'] = $adminUsernames[$promote['admin_id']] ?? '无';
$value['develop_type_text'] = getCompanyDevelopTypeText($value['develop_type']);
$value['game_name'] =clearGameNameType($value['game_name']);
$value['sdk_version'] =getGameTypeName($value['sdk_version']);
@ -538,6 +596,14 @@ class FinancePromoteController extends AdminController
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
}
/* if (!empty(I('develop_type'))) {
$map['company.develop_type'] = I('develop_type');
}
if (!empty(I('admin_id'))) {
$map['market_admin_id'] = I('admin_id');
} */
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type']) || isset($_REQUEST['partner_id'])) {
$map["game_id"] = array("in",implode(',', array_column(getGameidByPartnerNameType($_REQUEST['partner_id'],$_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
}
@ -650,7 +716,7 @@ class FinancePromoteController extends AdminController
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 inside_cash_count,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_name,'{$this->COMPANY_NAME}') company_name,IFNULL(promote.company_belong,0) company_belong")
IFNULL(company_name,'{$this->COMPANY_NAME}') company_name,develop_type,IFNULL(promote.company_belong,0) company_belong")
->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
->join("tab_promote promote ON s.promote_id = promote.id","left")
->join("tab_promote_company company ON promote.company_id = company.id","left")
@ -678,7 +744,9 @@ class FinancePromoteController extends AdminController
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count");
if ($join) {
$query = $query->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id');
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id')
->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])
->where($map)
@ -987,6 +1055,20 @@ class FinancePromoteController extends AdminController
}
$title .= (getCompanyBlong($_REQUEST['company_belong'])."-");
}
if (!empty(I('develop_type'))) {
$map['company.develop_type'] = I('develop_type');
if(I('develop_type') != 0){
$gfflg = false;
}
}
if (!empty(I('admin_id'))) {
$map['promote.admin_id'] = I('admin_id');
if(I('admin_id') != 0){
$gfflg = false;
}
}
if (isset($_REQUEST['promote_id'])) {
if($ptype){
$pmap = false;//取消非特异推广员检索

@ -81,13 +81,13 @@ class MemberController extends ThinkController
$marketAdminId = I('market_admin_id', 0);
if ($marketAdminId) {
$map['tab_user.market_admin_id'] = $marketAdminId;
$map['promote.admin_id'] = $marketAdminId;
}
$isMarketAdmin = isMarketAdmin();
if ($isMarketAdmin) {
$userAuth = session('user_auth');
$map['tab_user.market_admin_id'] = $userAuth['uid'];
$map['promote.admin_id'] = $userAuth['uid'];
}
if (isset($_REQUEST['status'])) {
@ -144,8 +144,8 @@ class MemberController extends ThinkController
$this->checkListOrCountAuthRestMap($map,["tab_user.id","tab_user.account","tab_user.device_number"]);
//计算用户列表
$data = M("user","tab_")
->field("tab_user.id,`device_number`,`age_status`,`account`,`balance`,`gold_coin`,`alipay`,tab_user.promote_id,`register_type`,tab_user.promote_account,`register_time`,`lock_status`,lock_remark,
`register_way`,`register_ip`,`login_time`,`check_status`,IFNULL(ss.pay_amount,0) AS recharge_total,tab_user.is_repeat,tab_user.market_admin_id")
->field("tab_user.id,`device_number`,`age_status`,tab_user.account,`balance`,`gold_coin`,`alipay`,tab_user.promote_id,`register_type`,tab_user.promote_account,`register_time`,`lock_status`,lock_remark,
`register_way`,`register_ip`,`login_time`,`check_status`,IFNULL(ss.pay_amount,0) AS recharge_total,tab_user.is_repeat,promote.admin_id")
->where($map)
->group("tab_user.id")
->order($order);
@ -164,6 +164,7 @@ class MemberController extends ThinkController
");
}
$data->join("tab_user_data AS ss ON ss.user_id = tab_user.id","left");
$data->join("tab_promote AS promote ON promote.id = tab_user.promote_id", "left");
if(!isset($_REQUEST['export'])){
$data ->page($page, $row);
@ -228,10 +229,10 @@ class MemberController extends ThinkController
data2csv($data,"玩家_玩家列表",$field);
}
$adminUsernameList = getAdminUsernameList(array_column($data, 'market_admin_id'));
$adminUsernameList = getAdminUsernameList(array_column($data, 'admin_id'));
foreach ($data as $key=>&$value ) {
($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):'';
$value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
$value['market_admin_username'] = $adminUsernameList[$value['admin_id']] ?? '无';
}
//计算总人数
@ -258,6 +259,7 @@ class MemberController extends ThinkController
");
}
$user_count->join("tab_user_data AS ss ON ss.user_id = tab_user.id","left");
$user_count->join("tab_promote AS promote ON promote.id = tab_user.promote_id", "left");
$userDbRes = $user_count->find();
if($is_repeat){
$user_count =$userDbRes['user_count'];

@ -136,7 +136,7 @@ class SpendController extends ThinkController
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
$adminUsernameList = getAdminUsernameList(array_column($data, 'market_admin_id'));
$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']] ?? '无';

@ -666,25 +666,35 @@ class UserController extends AdminController
unset($_REQUEST['role_id']);
}
$marketAdminId = I('market_admin_id', 0);
if ($marketAdminId) {
$map['market_admin_id'] = $marketAdminId;
}
$adminId = 0;
$isMarketAdmin = isMarketAdmin();
if ($isMarketAdmin) {
$userAuth = session('user_auth');
$map['market_admin_id'] = $userAuth['uid'];
$adminId = $userAuth['uid'];
}
// $promoteRoot = getPowerPromoteIds();
// $data_empower_type = session('user_auth')['data_empower_type'];
//
// if ($promoteRoot) {
$marketAdminId = I('market_admin_id', 0);
if ($adminId == 0) {
$adminId = $marketAdminId > 0 ? $marketAdminId : 0;
}
if ($adminId) {
$topPromoteIds = M('promote', 'tab_')->where(['admin_id' => $adminId, 'level' => 1])->getField('id', true);
$promoteIds = getPromoteIdsByTopIds($topPromoteIds);
if (count($promoteIds) == 0) {
$promoteIds = [-1];
}
$map['promote_id'] = ['in', $promoteIds];
}
// $promoteRoot = getPowerPromoteIds();
// $data_empower_type = session('user_auth')['data_empower_type'];
//
// if ($promoteRoot) {
// $map['promote_id'] =array('in',$promoteRoot);
// } else if(!$promoteRoot&&$data_empower_type!=1){
// $map['id'] = array('lt',1);
// }
// $map['id'] = array('lt',1);
// }
setPowerPromoteIds($map,'promote_id');
if (isset($_REQUEST['promote_id'])) {
@ -716,10 +726,10 @@ class UserController extends AdminController
$this->checkListOrCountAuthRestMap($map,["role_id", "role_name", "user_account"]);
$list = $this->lists(M('user_play_info', 'tab_'), $map, 'play_time desc');
$adminUsernameList = getAdminUsernameList(array_column($list, 'market_admin_id'));
$adminList = getMarketAdminsByPromoteIds(array_column($list, 'promote_id'));
foreach ($list as $key=>&$value ) {
($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):'';
$value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
$value['market_admin_username'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无';
}
$this->assign('list', $list);

@ -128,6 +128,23 @@
</volist>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
<option value="">请选择市场专员</option>
<?php foreach(getMarketAdmins() as $item):?>
<option value="<?=$item['id']?>" <?php if($item['id'] == I('admin_id')):?>selected<?php endif;?>><?=$item['username']?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="develop_type" name="develop_type" class="select_gallery" style="width:120px;">
<option value="">请选择开发类型</option>
<?php foreach(getCompanyDevelopTypes() as $key => $value):?>
<option value="<?=$key?>" <?php if($key == I('develop_type')):?>selected<?php endif;?>><?=$value?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
@ -177,8 +194,9 @@
<tr>
<th>推广公司</th>
<th>会长账号</th>
<th>所属市场专员</th>
<th>团体类型</th>
<th>开发类型</th>
<th >游戏</th>
<th >设备</th>
@ -210,7 +228,9 @@
<tr>
<td >{$data.company_name}</td>
<td >{$data.account}</td>
<td>{$data['admin_username']}</td>
<td >{$data.company_belong}</td>
<td>{$data['develop_type_text']}</td>
<td >{$data.game_name}</td>
<td >{$data.sdk_version}</td>
<td >{$data.cash_count}</td>
@ -225,7 +245,7 @@
</tr>
</volist>
<tr>
<td colspan="5" ><span>总计</span></td>
<td colspan="7" ><span>总计</span></td>
<td ><span><if condition="$sumCash neq ''">{$sumCash}<else/>0</if></span></td>
<td><if condition="$sumBalance neq ''">{$sumBalance}<else/>0</if></td>
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>

@ -94,7 +94,23 @@
<option value="0" <?php if ($_POST['promote_id'] == 0):?>selected<?php endif;?>>官方渠道</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
<option value="">请选择市场专员</option>
<?php foreach(getMarketAdmins() as $item):?>
<option value="<?=$item['id']?>" <?php if($item['id'] == I('admin_id')):?>selected<?php endif;?>><?=$item['username']?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="develop_type" name="develop_type" class="select_gallery" style="width:120px;">
<option value="">请选择开发类型</option>
<?php foreach(getCompanyDevelopTypes() as $key => $value):?>
<option value="<?=$key?>" <?php if($key == I('develop_type')):?>selected<?php endif;?>><?=$value?></option>
<?php endforeach;?>
</select>
</div>
<input type="hidden" name="promote_type" value="{$_GET['promote_type']}"/>
<input type="hidden" name="company_id" value="{$_GET['company_id']}"/>
<input type="hidden" name="company_belong" value="{$_GET['company_belong']}"/>

@ -119,6 +119,24 @@
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
<option value="">请选择市场专员</option>
<?php foreach(getMarketAdmins() as $item):?>
<option value="<?=$item['id']?>" <?php if($item['id'] == I('admin_id')):?>selected<?php endif;?>><?=$item['username']?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="develop_type" name="develop_type" class="select_gallery" style="width:120px;">
<option value="">请选择开发类型</option>
<?php foreach(getCompanyDevelopTypes() as $key => $value):?>
<option value="<?=$key?>" <?php if($key == I('develop_type')):?>selected<?php endif;?>><?=$value?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
placeholder="开始时间" />
@ -165,8 +183,9 @@
<tr>
<th>推广公司</th>
<th>会长渠道</th>
<th>所属市场专员</th>
<th>内外团</th>
<th>开发类型</th>
<th class="tooltip"><a class="paixu" data-order='cash_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'cash_count'" />
@ -215,8 +234,9 @@
<tr>
<td>{$data.company_name}</td>
<td>{$data['promote_account']}</td>
<td>{$data['admin_username']}</td>
<td>{$data['company_belong']}</td>
<td>{$data['develop_type_text']}</td>
<td>{$data.cash_count}</td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.balance_coin_count}
@ -248,7 +268,7 @@
</volist>
</empty>
<tr class="data_summary" style="text-align: center;">
<td colspan="3" style="text-align: center;">汇总:</td>
<td colspan="5" style="text-align: center;">汇总:</td>
<td style="text-align: center;">{$all_count['cash_count']}</td>
<td style="text-align: center;">{$all_count['balance_coin_count']}</td>
<td style="text-align: center;">{$all_count['bind_coin_count']}</td>

@ -109,6 +109,23 @@
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
<option value="">请选择市场专员</option>
<?php foreach(getMarketAdmins() as $item):?>
<option value="<?=$item['id']?>" <?php if($item['id'] == I('admin_id')):?>selected<?php endif;?>><?=$item['username']?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="develop_type" name="develop_type" class="select_gallery" style="width:120px;">
<option value="">请选择开发类型</option>
<?php foreach(getCompanyDevelopTypes() as $key => $value):?>
<option value="<?=$key?>" <?php if($key == I('develop_type')):?>selected<?php endif;?>><?=$value?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
placeholder="开始时间" />
@ -157,7 +174,9 @@
<tr>
<th>推广公司</th>
<th>推广员账号</th>
<th>内外团</th>
<th>所属市场专员</th>
<th>团体类型</th>
<th>开发类型</th>
<th class="tooltip"><a class="paixu" data-order='cash_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲
@ -206,8 +225,9 @@
<tr>
<td>{$data.company_name}</td>
<td>{$data['promote_account']}</td>
<td>{$data['admin_username']}</td>
<td>{$data['company_belong']}</td>
<td>{$data['develop_type_text']}</td>
<td>{$data.cash_count}</td>
<td>{$data.balance_coin_count}</td>
<td>{$data.bind_coin_count}</td>
@ -222,7 +242,7 @@
</volist>
</empty>
<tr class="data_summary">
<td colspan="2" style="text-align: center;">汇总:</td>
<td colspan="4" style="text-align: center;">汇总:</td>
<td style="text-align: center;">---</td>
<td style="text-align: center;">{$all_count['cash_count']}</td>
<td style="text-align: center;">{$all_count['balance_coin_count']}</td>

@ -29,14 +29,14 @@ class MarketService
$this->shiftDeposit($promoteIds, $formId, $toId, $time);
}
private function shiftPromote($promoteId, $formId, $toId, $time = null)
public function shiftPromote($promoteId, $formId, $toId, $time = null)
{
$map = [];
$map['id'] = $promoteId;
M('promote', 'tab_')->where($map)->save(['admin_id' => $toId]);
}
private function shiftSpend($promoteIds, $formId, $toId, $time = null)
public function shiftSpend($promoteIds, $formId, $toId, $time = null)
{
$map = [];
$map['promote_id'] = ['in', $promoteIds];
@ -54,7 +54,7 @@ class MarketService
M('spend', 'tab_')->where($map)->save(['market_admin_id' => $toId]);
}
private function shiftDeposit($promoteIds, $formId, $toId, $time = null)
public function shiftDeposit($promoteIds, $formId, $toId, $time = null)
{
$map = [];
$map['promote_id'] = ['in', $promoteIds];

Loading…
Cancel
Save