|
|
@ -37,17 +37,22 @@ function get_user_big_info($id=0, $flag=false) {
|
|
|
|
* @author 鹿文学
|
|
|
|
* @author 鹿文学
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function get_promote_list_by_id($id=0) {
|
|
|
|
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) {
|
|
|
|
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)) {
|
|
|
|
} 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){
|
|
|
|
} elseif(is_numeric($id) && $id<0){
|
|
|
|
$list = M("Promote","tab_")->field('id,account,balance_coin')->select();
|
|
|
|
$list = $query->where($map)->select();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$list = '';
|
|
|
|
$list = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $list;
|
|
|
|
return $list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -202,6 +207,8 @@ function get_promote_list($select='') {
|
|
|
|
function get_all_toppromote(){
|
|
|
|
function get_all_toppromote(){
|
|
|
|
$map['status']=1;
|
|
|
|
$map['status']=1;
|
|
|
|
$map['level']=['lt', 4];
|
|
|
|
$map['level']=['lt', 4];
|
|
|
|
|
|
|
|
//为数据权限添加
|
|
|
|
|
|
|
|
setPowerPromoteIds($map, 'id');
|
|
|
|
$list = M("Promote","tab_")->where($map)->select();
|
|
|
|
$list = M("Promote","tab_")->where($map)->select();
|
|
|
|
if (empty($list)){return '';}
|
|
|
|
if (empty($list)){return '';}
|
|
|
|
return $list;
|
|
|
|
return $list;
|
|
|
@ -584,6 +591,8 @@ function promote_lists($type){
|
|
|
|
} else{
|
|
|
|
} else{
|
|
|
|
$map = '';
|
|
|
|
$map = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//为数据权限添加
|
|
|
|
|
|
|
|
setPowerPromoteIds($map, 'id');
|
|
|
|
$data = M('promote','tab_')->where($map)->select();
|
|
|
|
$data = M('promote','tab_')->where($map)->select();
|
|
|
|
|
|
|
|
|
|
|
|
$items = M('PromoteBalanceCoin', 'tab_')->where(['game_id' => 0])->select();
|
|
|
|
$items = M('PromoteBalanceCoin', 'tab_')->where(['game_id' => 0])->select();
|
|
|
|