优化公会统计内充详情不符问题

master
chenzhi 5 years ago
parent 75c934490e
commit 71530c53e3

@ -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'])) {

@ -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;

Loading…
Cancel
Save