邀请排行
This commit is contained in:
parent
ba1898f389
commit
bc7319b21d
|
|
@ -138,6 +138,20 @@ class Index extends Base
|
|||
}
|
||||
return $this->renderSuccess('请求成功', $data);
|
||||
}
|
||||
/**
|
||||
* 邀请排行
|
||||
*/
|
||||
|
||||
public function get_user_yaoqing()
|
||||
{
|
||||
//select * from ( SELECT pid,count(1) n FROM xinglanmh_shequt_test.`user` where pid>0 group by pid ) t where n>1 order by n desc LIMIT 10
|
||||
$list = User::where('pid', '>', 0)
|
||||
->group('pid')
|
||||
->having('COUNT(*)', '>', 1)
|
||||
->order('COUNT(*) desc')
|
||||
->select();
|
||||
return $this->renderSuccess('请求成功', $list);
|
||||
}
|
||||
|
||||
public function generate_urllink()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user