Merge branch 'feature/market_percentage' of wmtx/platform into release

列表全部开发给市场专员,其他人员的数据隐
master
廖金灵 4 years ago committed by Gogs
commit 262940a42f

@ -2766,4 +2766,44 @@ function getDateMarket() {
// dump($return);
return $return;
}
/**
* 渠道列表
* @param $type
* @return mixed
*/
function promote_listsMarket($type){
if($type){
$map['level'] = $type;
} else{
$map = '';
}
// $promoteRoot = getPowerPromoteIds();
// if ($promoteRoot) {
// $map['id'] =array('in',$promoteRoot);
// }
setPowerPromoteIds($map,'id');
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id;
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) {
unset($map['admin_id']);
}
$data = M('promote','tab_')->where($map)->select();
$items = M('PromoteBalanceCoin', 'tab_')->where(['game_id' => 0])->select();
$records = [];
foreach ($items as $item) {
$records[$item['promote_id']] = $item['num'];
}
foreach ($data as $key => $item) {
$item['common_coin'] = isset($records[$item['id']]) ? $records[$item['id']] : $item['balance_coin'];
$data[$key] = $item;
}
return $data;
}

@ -20,6 +20,13 @@ class MarketPercentageController extends ThinkController
$_REQUEST['relation_game_id']?($map['relation_game_id'] = $_REQUEST['relation_game_id']):'';
$_REQUEST['sdk_version']?($map['sdk_version'] = $_REQUEST['sdk_version']):'';
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id;
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) {
unset($map['admin_id']);
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
}
$search_date = [];
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
@ -179,6 +186,13 @@ class MarketPercentageController extends ThinkController
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
$_REQUEST['group_id']?($map['level'] = $_REQUEST['group_id']):'';
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id;
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) {
unset($map['admin_id']);
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
}
$search_date = [];
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
@ -754,7 +768,7 @@ class MarketPercentageController extends ThinkController
exec("source /etc/profile;cd ".ROOTTT.";php admin.php timing/caculateMarketStream/time/{$pay_time} > /dev/null &");
$this->success('操作成功,后台正在计算中,请稍后再打开......');
$this->ajaxReturn(['status'=>1]);
}
public function showBonusList($row = 10, $p = 1) {

@ -70,7 +70,7 @@
<div class="input-list input-list-parent search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">请选择会长账号</option>
<volist name=":promote_listsOther(1)" id="vo">
<volist name=":promote_listsMarket(1)" id="vo">
<option data-company_belong="{$vo['company_belong']}" data-belong="{:getCompanyBlong($vo['company_belong'])}" promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['promote_id']">selected=selected</if>>{$vo.account}</option>
</volist>
</select>
@ -342,10 +342,14 @@
dataType: 'json',
async: false,
success:function(data){
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
if(data.status == 1) {
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg(data.info);
}
},
});
}, function(){

@ -334,10 +334,15 @@
dataType: 'json',
async: false,
success:function(data){
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
if(data.status == 1) {
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg(data.info);
}
},
});
}, function(){

@ -388,10 +388,14 @@
dataType: 'json',
async: false,
success:function(data){
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
if(data.status == 1) {
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg(data.info);
}
},
});
}, function(){

@ -336,10 +336,14 @@
dataType: 'json',
async: false,
success:function(data){
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
if(data.status == 1) {
layer.msg("重新计算需要时间,请等待5分钟后再查看");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg(data.info);
}
},
});
}, function(){

Loading…
Cancel
Save