Commit 78284b82 by 冷斌

update

parent dc826101
......@@ -55,8 +55,6 @@ class PromotersController extends AdminbaseController{
foreach($users as $k=>$v){
$path=setpath($v['id']);
$uids=$Proxy->where("type = 0 and path like '%{$path}%'")->getField('uid',true);
var_dump($path, $uids);
die;
if(!$uids){
$uids=[];
......@@ -71,13 +69,20 @@ class PromotersController extends AdminbaseController{
}
$v['total_charge']=$total_charge;
$map2=[];
$map2['id'] = array('in',$uids);
$total_coin=$User->where("user_type=2")->where($map2)->sum('consumption');
if(!$total_coin){
$total_coin='0';
}
$v['total_coin']=$total_coin;
// $map2=[];
// $map2['id'] = array('in',$uids);
// $total_coin=$User->where("user_type=2")->where($map2)->sum('consumption');
// if(!$total_coin){
// $total_coin='0';
// }
// $v['total_coin']=$total_coin;
$total_coin = M('users_coinrecord')
// ->select("sum('totalcoin') as sum")
->where("uid = {$v['id']} and type='expend' and action in ('sendgift','sendbarrage')")
->sum('totalcoin');
$v['total_coin'] = (int)$total_coin;
$map3=[];
$map3['uid'] = array('in',$uids);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment