master
ELF 5 years ago
parent 37188cb085
commit 437909d53a

@ -44,7 +44,7 @@ class RechargeSumController extends ThinkController{
$map['pay_way'] = array('egt',0);
}
if(!empty($_REQUEST['promote_id'])){
if(isset($_REQUEST['promote_id'])){
// switch ($_REQUEST['promote_id']) {
// case 'GUANFANG':
// $map['promote_id'] = 0;
@ -59,8 +59,12 @@ class RechargeSumController extends ThinkController{
// $rmap['promote_id'] = $_REQUEST['promote_id'];
// break;
// }
$promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select();
$promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
if ($_REQUEST['promote_id'] > 0) {
$promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select();
$promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
} else {
$rmap['promote_id'] = $map['promote_id'] = 0;
}
}
//当天注册人数
@ -88,6 +92,9 @@ class RechargeSumController extends ThinkController{
case 'GUANFANG':
$data[$key]['promote_id'] = "官方渠道";
break;
case 0:
$data[$key]['promote_id'] = "官方渠道";
break;
case 'PROMOTE':
$data[$key]['promote_id'] = "推广渠道";
break;

@ -71,7 +71,11 @@ class SpendController extends ThinkController {
unset($_REQUEST['pay_game_status']);
}
if(isset($_REQUEST['promote_id'])) {
$map['_complex'] = ['tp.parent_id'=>$_REQUEST['promote_id'], 'tp.grand_id'=>$_REQUEST['promote_id'], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or'];
if ($_REQUEST['promote_id'] == 0) {
$map['promote_id'] = 0;
} else {
$map['_complex'] = ['tp.parent_id'=>$_REQUEST['promote_id'], 'tp.grand_id'=>$_REQUEST['promote_id'], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or'];
}
$tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id";
//unset($_REQUEST['promote_id']);
} else {

@ -570,8 +570,14 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
unset($_REQUEST['role_name']);
}
if (isset($_REQUEST['promote_id'])) {
$promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select();
$promoter_ids ? $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
$queryStr = '';
if ($_REQUEST['promote_id'] == 0) {
$map['promote_id'] = '0';
} else {
$queryStr = "parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}";
$promoter_ids = D("Promote")->where($queryStr)->field('id')->select();
$promoter_ids ? $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
}
}
empty(I('user_account')) || $map['user_account'] = ['like',"%".I('user_account')."%"];

@ -406,7 +406,7 @@ $(function(){
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option><option value="UC" '+(promote_id && 'UC' == promote_id?'selected':'')+'>UC用户</option>';
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -292,7 +292,7 @@ $(function(){
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = "<option value=''>请选择推广员</option>";
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -487,7 +487,7 @@
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = "<option value=''>请选择推广员</option>";
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -101,7 +101,8 @@
<th class="">游戏区服</th>
<th class="">角色ID</th>
<th class="">角色名</th>
<th class="">游戏等级</th>
<th class="">游戏等级</th>
<th class="">所属推广员</th>
<th class="">最后登录时间</th>
<th class="">最后登录IP</th>
<!-- <th class="">操作</th> -->
@ -121,7 +122,8 @@
<td><notempty name="servername">{$servername}<else /></notempty></td>
<td><span class="badge">{$data['role_id']}</span></td>
<td><notempty name="rolename">{$rolename}<else /></notempty></td>
<td>{$data.role_level}</td>
<td>{$data.role_level}</td>
<td>{$data.promote_account}</td>
<td><?= date('Y-m-d H:i:s', $data['play_time']) ?></td>
<td>{$data.play_ip}</td>
<!-- <td><a class="ajax-get" href="{:U('user_update',['ids'=>$data['id']])}">更新</a></td> -->
@ -246,7 +248,7 @@ $(".select_gallery").select2();
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>';
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

Loading…
Cancel
Save