Commit 0ae521a1 by 冷斌

fix bug

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