Merge branch 'release-1.0.0' of 47.111.118.107:wmtx/platform into release-1.0.0

master
zhanglingsheng 5 years ago
commit 2ec116a017

@ -178,7 +178,7 @@ $(document).ready(function () {
<volist name="fl_set" id="vo">
<tr>
<td>【返利设置】</td>
<td><a href="/admin.php?s=/Rebate/lists.html" target="_blank"><span>【{$vo.game_name}】充值返利已到期</span></a></td>
<td><a href="/admin.php?s=/Rebate/lists.html"><span>【{$vo.game_name}】充值返利已到期</span></a></td>
</tr>
</volist>
@ -186,7 +186,7 @@ $(document).ready(function () {
<tr>
<td>【礼包列表】</td>
<td>
<a href="{:U('Giftbag/edit',array('id'=>$vo['id']))}" target="_blank">
<a href="{:U('Giftbag/edit',array('id'=>$vo['id']))}">
<if condition="$vo['server_id'] eq 0">
<span>【{$vo.game_name}】{$vo.giftbag_name}数量不足</span>
<else/>

@ -37,17 +37,22 @@ function get_user_big_info($id=0, $flag=false) {
* @author 鹿文学
*/
function get_promote_list_by_id($id=0) {
//为数据权限修改 2019-12-19 lww
$query = M("Promote","tab_")->field('id,account,balance_coin');
$map = array();
setPowerPromoteIds($map, 'id');
if(is_numeric($id) && $id>=0) {
$list = M("Promote","tab_")->field('id,account,balance_coin')->where(['parent_id'=>$id])->select();
$map['parent_id'] = $id;
$list = $query->where($map)->select();
} elseif(is_array($id)) {
$list = M("Promote","tab_")->field('id,account,balance_coin')->where(['parent_id'=>array('in',$id)])->select();
$map['parent_id'] = array('in',$id);
$list = $query->where($map)->select();
} elseif(is_numeric($id) && $id<0){
$list = M("Promote","tab_")->field('id,account,balance_coin')->select();
$list = $query->where($map)->select();
} else {
$list = '';
}
return $list;
}
@ -202,6 +207,8 @@ function get_promote_list($select='') {
function get_all_toppromote(){
$map['status']=1;
$map['level']=['lt', 4];
//为数据权限添加
setPowerPromoteIds($map, 'id');
$list = M("Promote","tab_")->where($map)->select();
if (empty($list)){return '';}
return $list;
@ -584,6 +591,8 @@ function promote_lists($type){
} else{
$map = '';
}
//为数据权限添加
setPowerPromoteIds($map, 'id');
$data = M('promote','tab_')->where($map)->select();
$items = M('PromoteBalanceCoin', 'tab_')->where(['game_id' => 0])->select();
@ -1601,6 +1610,11 @@ function getPowerPromoteIds()
}
}
}
// var_dump(in_array('-1',explode(',',$userAuth['data_president'])));die();
if (in_array('-1',explode(',',$userAuth['data_president']))) {
$promoteIds = $promoteIds .',0';
}
// var_dump($promoteIds);die();
session('user_auth_promote_ids', $promoteIds);
return $promoteIds;
}

@ -482,7 +482,7 @@ class AuthManagerController extends AdminController{
if ($AuthGroup->where("id = {$gid}")->save(array('data_empower_type'=>$data_empower_type,'data_president'=>$promoteData))) {
$this->success('操作成功',U('AuthManager/index'));
} else {
$this->error('操作失败');
$this->error('操作失败,请改变成员');
}
}
@ -491,6 +491,8 @@ class AuthManagerController extends AdminController{
$promoteData = M('promote','tab_')->field('id as value,account as title')->where(array('level'=>1,'chain'=>'/'))->select();
$data_president = M('AuthGroup')->field('data_president')->where(array('id'=>$_REQUEST['group_id']))->find();
$promoteData = array_merge([0=>['value'=>'-1','title'=>'官方渠道']],$promoteData);
$returnData = array('data_president'=>$data_president['data_president'],'list'=>$promoteData);
$this->ajaxReturn(json_encode($returnData));

@ -41,6 +41,9 @@ class BehaviorLogController extends ThinkController
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
setPowerPromoteIds($map,'promote_id');
if (isset($params['promote_id'])) {
$promoteId = $params['promote_id'];
if ($promoteId == 0) {

File diff suppressed because it is too large Load Diff

@ -88,6 +88,7 @@ class MemberController extends ThinkController
$game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' ";
}
$promoteRoot = getPowerPromoteIds();
// $data_empower_type = session('user_auth')['data_empower_type'];
//// var_dump($promoteRoot);die();
//

@ -53,7 +53,8 @@ class PromoteController extends ThinkController
if ($_REQUEST['parent_id']=='全部') {
unset($_REQUEST['parent_id']);
}
$zid=get_zi_promote_id($_REQUEST['parent_id']);
$zid = get_zi_promote_id($_REQUEST['parent_id'], null);
// dd($zid);
if ($zid) {
$zid=$zid.','.$_REQUEST['parent_id'];
} else {
@ -134,11 +135,10 @@ class PromoteController extends ThinkController
}
}
// dump($map);die();
//为数据权限添加
setPowerPromoteIds($map, 'id');
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p, $row)->select();
$oa_data = [];
if (I('oa_associated', -1) == -1) {
foreach ($list_data as $k => $v) {
@ -198,13 +198,16 @@ class PromoteController extends ThinkController
parent::lists('SiteApply', $p, $map);
}
public function add($account=null, $password=null, $second_pwd=null, $real_name=null, $email=null, $mobile_phone=null, $bank_name=null, $bank_card=null, $admin=null, $status=null, $ba_id = null)
public function add($account=null, $password=null, $second_pwd=null, $real_name=null, $email=null,
$mobile_phone=null, $bank_name=null, $bank_card=null, $admin=null, $status=null, $ba_id = null, $company_id = null)
{
if (IS_POST) {
if (C('PROMOTE_AUTO_AUDIT') == 1) {
$status = 1;
}
$data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id);
$data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,
'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,
'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id, 'company_id' => $company_id);
if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) {
$this->error('账号只能是6-15位字母或数字');
@ -217,6 +220,7 @@ class PromoteController extends ThinkController
$ba = new \Admin\Model\BusinessAffairsModel();
$ba->add_child($_REQUEST['ba_id'],$res);
} */
session('user_auth_promote_ids', null);
$this->success("添加成功", U('lists'));
} else {
$this->error($res);
@ -224,6 +228,8 @@ class PromoteController extends ThinkController
} else {
$this->meta_title ='新增渠道信息';
$this->m_title = '推广员列表';
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
$this->assign('companys', $companys);
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
$this->display();
}
@ -288,6 +294,9 @@ class PromoteController extends ThinkController
$ba = new \Admin\Model\BusinessAffairsModel();
$ba->update_child($ba_id['ba_id'], $_REQUEST['ba_id'], $id);
}
if (!empty(I('company_id'))) {
$data['company_id'] = I('company_id');
}
$res=M("promote", "tab_")->where(array("id"=>$_POST['id']))->save($data);
if ($res !== false) {
@ -337,7 +346,8 @@ class PromoteController extends ThinkController
$this->m_title = '推广员列表';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
$this->assign('companys', $companys);
$this->display();
}
}

@ -185,7 +185,14 @@ class StatisticsCountSetController extends Controller {
$value['create_time']=$this->nowdata;
$value['active_user_list'] = @json_encode(array_map("intFun",explode(",",$value['active_user_list'])));
if(empty($value['promote_account']) && $value['promote_id']){
$value['promote_account'] = $this->PromoteModel->field("account")->where("id = {$value['promote_id']}")->find()['account'];
if($value['promote_id'] == 0){
$value['promote_account'] = "官方渠道";
}else{
$value['promote_account'] = $this->PromoteModel->field("account")->where("id = {$value['promote_id']}")->find()['account'];
if(!$value['promote_account']){
$value['promote_account']="未知推广员";
}
}
}
$tempdbres = $this->PromoteCountModel->add($value);
if($tempdbres === false){

@ -392,10 +392,18 @@ class PromoteModel extends Model{
$where['level'] = $level;
setPowerPromoteIds($where,'id');
$offcialData = [0=>['id'=>0,'nickname'=>'官方渠道']];
$result = $this->field("*")->where($where)->select();
foreach ($result as &$item) {
$item['nickname'] = $item['account'] . ($item['nickname'] ? "({$item['nickname']})" : "");
}
if (in_array('0',explode(',',$where['id'][1]))) {
$result = array_merge($offcialData,$result);
// dump($result);die();
}
return $result;
}
}

@ -66,7 +66,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">推广员账号</option>
<volist name=":get_promote_list(1)" id="vo">
<volist name=":get_promote_listOther(1)" id="vo">
<option value="{$vo.id}">{$vo.account}</option>
</volist>
</select>

@ -120,6 +120,8 @@
if (JSON.parse(data1).data_president) {
var data2 = JSON.parse(data1).data_president.split(",");
}
// var dataTransfers = transfer.getData('key123');
// $('#promote_data').val(JSON.stringify(dataTransfers));
//显示搜索框
transfer.render({
elem: '#test4'
@ -134,6 +136,9 @@
$('#promote_data').val(JSON.stringify(dataTransfer));
}
})
var dataTransfers = transfer.getData('key123');
$('#promote_data').val(JSON.stringify(dataTransfers));
transfets = transfer;
//批量办法定事件
util.event('lay-demoTransferActive', {

@ -64,7 +64,7 @@
<input type="hidden" name="id" value="{$this_group.id}" />
<button type="submit" class="submit_btn ajax-post" target-form="auth-form">确 定</button>
<button class="back_btn" onclick="javascript:history.back(-1);return false;">返 回</button>
<a class="back_btn" href="{:U('index')}" style="display: inline-block">返 回</a>
</form>
</div>

@ -58,7 +58,7 @@
</div>
<div class="main-title" style="border-bottom: 0px solid #C1C1C1 !important;">
<div class="main-title" style="border-bottom: 0px solid #C1C1C1 !important;margin-bottom: 0;padding-bottom: 0">
<div class="page_nav fl">
{$_page}
</div>
@ -67,9 +67,17 @@
<input class="" type="text" name="uid" style="width:240px;" placeholder="请输入uid,多个用英文逗号分隔">
<input type="hidden" name="group_id" value="{:I('group_id')}">
<a type="submit" class="ajax-post" target-form="add-user" style="float:right;margin-left:15px;"><span class="button_icon button_icon1"></span>新增</a>
</form>
</div>
</div>
<div class="tabcon1711">
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('index')}" style="margin-top: 0;float: right; color: #000000;
background: #ffffff;
border: solid 1px #000;">
返回
</a></div>
</div>

@ -417,7 +417,9 @@
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>';
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"

@ -306,7 +306,9 @@
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>';
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"

@ -456,7 +456,10 @@ $(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>' +
// '<option value="UC"'+(promote_id && 'UC' == promote_id?'selected':'')+'>UC渠道</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>';

@ -55,7 +55,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">推广员账号</option>
<volist name=":get_promote_list(1)" id="vo">
<volist name=":get_promote_listOther(1)" id="vo">
<option promote-id="{$vo.id}" value="{$vo.id}">{$vo.account}</option>
</volist>
</select>

@ -68,7 +68,7 @@ background-color: #FF9797;
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_name" class="select_gallery" style="width:120px;">
<option value="">推广员账号</option>
<volist name=":get_promote_list(1)" id="vo">
<volist name=":get_promote_listOther(1)" id="vo">
<option promote-id="{$vo.id}" value="{$vo.account}">{$vo.account}</option>
</volist>
</select>

@ -168,6 +168,22 @@
</td>
</tr>
</if>
<tr>
<td class="l">推广公司:</td>
<td class="r">
<select name="company_id" id="company_id">
<option value="0">请选择推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}" <?php echo ($vo['id'] == $data['company_id'] ? 'selected':''); ?>
>{$vo.company_name} </option>
</volist>
</select>
<span class="notice-text">设置该推广员所属的推广公司</span>
</td>
</tr>
<tr>
<td class="l">注册时间:</td>
<td class="r">

@ -78,7 +78,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" >
<option value="">推广员账号</option>
<volist name=":get_promote_list(1)" id="vo">
<volist name=":get_promote_listOther(1)" id="vo">
<option promote-id="{$vo.id}" value="{$vo.id}">{$vo.account}</option>
</volist>
</select>

@ -96,7 +96,7 @@ background-color: #FF9797;
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_name" class="select_gallery" style="width:120px;">
<option value="">推广员账号</option>
<volist name=":get_promote_list(1)" id="vo">
<volist name=":get_promote_listOther(1)" id="vo">
<option promote-id="{$vo.id}" value="{$vo.account}">{$vo.account}</option>
</volist>
</select>

@ -121,11 +121,7 @@
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('
PromoteCoin / send_lists
')}'
)
;
highlight_subnav("{:U('PromoteCoin/send_lists')}");
$('#submit').click(function () {
$('#form').submit();

@ -59,7 +59,7 @@
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal" style="margin-left:210px;">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('Partner/lists')}" >
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:history.back(-1);" >
返回
</a>
</div>

@ -300,7 +300,9 @@ $(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>';
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>';

@ -491,7 +491,9 @@
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>';
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"

@ -167,6 +167,8 @@
'promote_id'=>I('promote_id'),
'game_type'=>I('game_type'),
'xlsname'=>'玩家_角色查询',
'time_start'=>I('time_start'),
'time_end'=>I('time_end'),
))}">导出</a>
{$_page}
</div>
@ -301,7 +303,10 @@ $(".select_gallery").select2();
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>' +
// '<option value="UC"'+(promote_id && 'UC' == promote_id?'selected':'')+'>UC渠道</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>';

@ -2015,8 +2015,8 @@ function get_parent_promote_($prmote_id=0,$isShwo=true)
return $result;
}
//获取当前子渠道
function get_zi_promote_id($id){
//获取当前子渠道,推广员列表不用过滤锁定的推广员
function get_zi_promote_id($id, $status = 1){
// $map['parent_id']=$id;
// $map['grand_id'] = $id;
// $map['_logic'] = 'or';
@ -2035,8 +2035,8 @@ function get_zi_promote_id($id){
if ($self['level'] == 1) {
$self['chain'] = "/{$id}/";
}
$map['status'] = 1;
if ($status)
$map['status'] = $status;
$map["chain"] = array("LIKE","%{$self['chain']}%");
$map["level"] = array("GT",$self['level']);

@ -764,4 +764,11 @@ CREATE TABLE `tab_promote_count` (
KEY `new_user_count` (`new_user_count`) USING BTREE,
KEY `active_user_count` (`active_user_count`) USING BTREE,
KEY `pay_money_count` (`pay_money_count`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='总览推广员统计聚合';
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='总览推广员统计聚合';
-- 2019-12-19 zyx
ALTER TABLE `sys_auth_group`
ADD COLUMN `data_empower_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '数据权限 1 全部 2 部分数据 3 自己底下的会长' AFTER `rules`;
ALTER TABLE `platform`.`sys_auth_group`
ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`;

Loading…
Cancel
Save