Commit c43625fb by 冷斌

update

parent 2b23b23c
...@@ -68,22 +68,14 @@ class PromotersController extends AdminbaseController{ ...@@ -68,22 +68,14 @@ class PromotersController extends AdminbaseController{
} }
$v['total_charge']=$total_charge; $v['total_charge']=$total_charge;
// $map2=[]; $map2=[];
// $map2['id'] = array('in',$uids); $map2['id'] = array('in',$uids);
// $total_coin=$User->where("user_type=2")->where($map2)->sum('consumption'); $total_coin=$User->where("user_type=2")->where($map2)->sum('consumption');
// if(!$total_coin){ if(!$total_coin){
// $total_coin='0'; $total_coin='0';
// } }
// $v['total_coin']=$total_coin; $v['total_coin']=$total_coin;
var_dump($path);
$results = 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)$results;
var_dump($results);
die;
$map3=[]; $map3=[];
$map3['uid'] = array('in',$uids); $map3['uid'] = array('in',$uids);
$total_votes=$Votes->where("type='income'")->where($map3)->sum('votes'); $total_votes=$Votes->where("type='income'")->where($map3)->sum('votes');
......
...@@ -74,21 +74,13 @@ class ProxyController extends AdminbaseController{ ...@@ -74,21 +74,13 @@ class ProxyController extends AdminbaseController{
$v['total_charge']=$total_charge; $v['total_charge']=$total_charge;
//总消费 //总消费
// $map2=[]; $map2=[];
// $map2['id'] = array('in',$uids); $map2['id'] = array('in',$uids);
// $total_coin=$User->where("user_type=2")->where($map2)->sum('consumption'); $total_coin=$User->where("user_type=2")->where($map2)->sum('consumption');
// if(!$total_coin){ if(!$total_coin){
// $total_coin='0'; $total_coin='0';
// } }
// $v['total_coin']=$total_coin; $v['total_coin']=$total_coin;
$results = 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)$results;
//主播收益 //主播收益
$map3=[]; $map3=[];
......
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