From 6c45b4dd3f5180c0bdb1b6f75bc666ced395341e Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Mon, 4 Nov 2019 13:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E4=B8=8B?= =?UTF-8?q?=E7=BA=A7=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 55133a125..0e0b103f4 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1900,7 +1900,7 @@ function arr_count1($string){ return $cou; } /** - * 获取新推广权限后底下推广员子账号 + * 获取新推广权限后 底下推广员子账号 * @param int $id 推广员id * @param array,string 查询字段 * @return array @@ -1908,8 +1908,13 @@ function arr_count1($string){ function getPrmoteChlidAccount($id=0,$field="*") { $promote = M("promote","tab_"); + //获取自己的等级 + $self = $promote->field("chain,level")->where("id = '{$id}'")->find(); + $map['status'] = 1; - $map["chain"] = array("LIKE","%/{$id}/%"); + $map["chain"] = array("LIKE","%{$self['chain']}%"); + $map["level"] = array("GT",$self['level']); + $data = $promote->field($field)->where($map)->select(); if(empty($data)){return array();} return $data;