|
|
|
@ -1989,11 +1989,14 @@ function getPrmoteChlidAccount($id=0,$field="*")
|
|
|
|
|
$promote = M("promote","tab_");
|
|
|
|
|
//获取自己的等级
|
|
|
|
|
$self = $promote->field("chain,level")->where("id = '{$id}'")->find();
|
|
|
|
|
|
|
|
|
|
if($self['chain'] == "/"){
|
|
|
|
|
$self['chain'] = "/".$id."/";
|
|
|
|
|
}
|
|
|
|
|
$map['status'] = 1;
|
|
|
|
|
$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;
|
|
|
|
|