Merge branch 'dev_permission' into release-1.0.0

master
liuweiwen 5 years ago
commit 21e90e6cb3

@ -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();

@ -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>

@ -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>

@ -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>

@ -765,3 +765,10 @@ CREATE TABLE `tab_promote_count` (
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='总览推广员统计聚合';
-- 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