diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 2dc730292..1a8d4c64e 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -789,7 +789,9 @@ class FinancePromoteController extends AdminController if($_REQUEST['promote_id'] == 0){ $isgf = true; } - $map['s.promote_id'] = $_REQUEST['promote_id']; + // $map['s.promote_id'] = $_REQUEST['promote_id']; + //内充需要底下全部的会员,包含自己的充值 + $map['s.promote_id'] = array("in",implode(",",array_column(getPrmoteChlidAccount($_REQUEST['promote_id'],"id"),"id")).",".$_REQUEST['promote_id']); } //检索 if (isset($_REQUEST['sn'])) { diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 9f9414132..abd908520 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1989,10 +1989,13 @@ 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();}