Commit bdb08e01 by 冷斌

fix bug

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