From 71530c53e38e399ee9c9a8255c6bf2e414ba15b8 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Mar 2020 18:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=9A=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=86=85=E5=85=85=E8=AF=A6=E6=83=85=E4=B8=8D=E7=AC=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancePromoteController.class.php | 4 +++- Application/Common/Common/extend.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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();}