Commit bdb08e01 by 冷斌

fix bug

parent d0a4ff01
...@@ -1173,14 +1173,15 @@ class Model_Home extends PhalApi_Model_NotORM { ...@@ -1173,14 +1173,15 @@ class Model_Home extends PhalApi_Model_NotORM {
$where.=" type='expend' and action in ('sendgift','sendbarrage') and uid in ({$userids}) "; $where.=" type='expend' and action in ('sendgift','sendbarrage') and uid in ({$userids}) ";
$result=DI()->notorm->users_coinrecord $result=DI()->notorm->users_coinrecord
->select('sum(totalcoin) as totalcoin, uid') ->select('sum(totalcoin) as totalcoin, touid')
->where($where) ->where($where)
->group('uid') ->group('touid')
->order('totalcoin desc') ->order('totalcoin desc')
->limit(100) ->limit(100)
->fetchAll(); ->fetchAll();
foreach ($result as $k => $v) { foreach ($result as $k => $v) {
$userinfo=getUserInfo($v['uid']); $userinfo=getUserInfo($v['touid']);
$v['uid']=$v['touid'];
$v['avatar']=$userinfo['avatar']; $v['avatar']=$userinfo['avatar'];
$v['avatar_thumb']=$userinfo['avatar_thumb']; $v['avatar_thumb']=$userinfo['avatar_thumb'];
$v['user_nicename']=$userinfo['user_nicename']; $v['user_nicename']=$userinfo['user_nicename'];
......
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