Commit 2834ab27 by 冷斌

update

parent 8d90b242
...@@ -69,14 +69,6 @@ class PromotersController extends AdminbaseController{ ...@@ -69,14 +69,6 @@ class PromotersController extends AdminbaseController{
} }
$v['total_charge']=$total_charge; $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;
//"uid in ('{$uids}') and type='expend' and action in ('sendgift','sendbarrage')"
$map2 = [ $map2 = [
'uid' => ['in', $uids], 'uid' => ['in', $uids],
'type' => 'expend', 'type' => 'expend',
......
...@@ -74,13 +74,16 @@ class ProxyController extends AdminbaseController{ ...@@ -74,13 +74,16 @@ class ProxyController extends AdminbaseController{
$v['total_charge']=$total_charge; $v['total_charge']=$total_charge;
//总消费 //总消费
$map2=[]; $map2 = [
$map2['id'] = array('in',$uids); 'uid' => ['in', $uids],
$total_coin=$User->where("user_type=2")->where($map2)->sum('consumption'); 'type' => 'expend',
if(!$total_coin){ 'action' => ['in', ['sendgift','sendbarrage']],
$total_coin='0'; ];
} $total_coin = M('users_coinrecord')
$v['total_coin']=$total_coin; // ->select("sum('totalcoin') as sum")
->where($map2)
->sum('totalcoin');
$v['total_coin'] = (int)$total_coin;
//主播收益 //主播收益
$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