房间小时榜
This commit is contained in:
@@ -23,6 +23,8 @@ class RoomHourRanking
|
|||||||
//房间小时榜
|
//房间小时榜
|
||||||
public function room_hour_ranking()
|
public function room_hour_ranking()
|
||||||
{
|
{
|
||||||
|
$page = input('page', 1);
|
||||||
|
$page_limit = input('page_limit', 20);
|
||||||
//判断是否开启
|
//判断是否开启
|
||||||
$open_time = db::name('vs_hour_ranking_config')->order('id', 'desc')->value('open_time');
|
$open_time = db::name('vs_hour_ranking_config')->order('id', 'desc')->value('open_time');
|
||||||
if ($open_time = 0) {
|
if ($open_time = 0) {
|
||||||
@@ -38,7 +40,7 @@ class RoomHourRanking
|
|||||||
->where('b.from',2)
|
->where('b.from',2)
|
||||||
->where('b.createtime', 'between', [$start_time, time()])
|
->where('b.createtime', 'between', [$start_time, time()])
|
||||||
->order('total_price', 'desc')
|
->order('total_price', 'desc')
|
||||||
// ->limit(20)
|
->page($page, $page_limit)
|
||||||
->select();
|
->select();
|
||||||
if($profit){
|
if($profit){
|
||||||
foreach ($profit as &$v) {
|
foreach ($profit as &$v) {
|
||||||
@@ -48,7 +50,6 @@ class RoomHourRanking
|
|||||||
}else{
|
}else{
|
||||||
$v['xlh_status'] = 0;
|
$v['xlh_status'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return V(1, '获取成功', $profit);
|
return V(1, '获取成功', $profit);
|
||||||
|
|||||||
Reference in New Issue
Block a user