Commit 0ae521a1 by 冷斌

fix bug

parent cf95f4f2
...@@ -90,15 +90,11 @@ class IndexadminController extends AdminbaseController { ...@@ -90,15 +90,11 @@ class IndexadminController extends AdminbaseController {
foreach($lists as $k=>$v){ foreach($lists as $k=>$v){
$v['code']=$Agent_code->where("uid = {$v['id']}")->getField('code'); $v['code']=$Agent_code->where("uid = {$v['id']}")->getField('code');
//consumption //consumption
$v['consumption'] = M('users_coinrecord')->where([ $consumption = M('users_coinrecord')->where([
'uid' => $v['id'], 'uid' => $v['id'],
'type'=> 'expend', 'type'=> 'expend',
])->sum('totalcoin'); ])->sum('totalcoin');
$v['consumption'] = $consumption ? $consumption : 0;
var_dump($v);
die;
$lists[$k]=$v; $lists[$k]=$v;
} }
......
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