diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index e19525af9..e5c4f2532 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -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) { diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 223d6ce23..3185e289c 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -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']);