秘地新的需求池更新版本-1-公会房间列表加总流水
This commit is contained in:
@@ -406,6 +406,8 @@ class Guild extends adminApi
|
||||
return V(0,"暂无数据");
|
||||
}
|
||||
$rum_lists = [];
|
||||
//总流水
|
||||
$total_consumption = 0;
|
||||
foreach ($list as $k=>$v){
|
||||
$search_stime = $search_stime_str;
|
||||
$search_etime = $search_etime_str;
|
||||
@@ -441,15 +443,18 @@ class Guild extends adminApi
|
||||
//房间流水
|
||||
$rum_lists[$k]['consumption']= model('Room')->getRoomFlow($v['room_id'],$search_stime,$search_etime);
|
||||
$rum_lists[$k]['add_time'] = date('Y-m-d H:i:s',$v['createtime']);
|
||||
$total_consumption += $rum_lists[$k]['consumption'];
|
||||
}
|
||||
usort($rum_lists, function($a, $b) {
|
||||
return $b['consumption'] - $a['consumption'];
|
||||
});
|
||||
//分页
|
||||
$rum_lists = array_slice($rum_lists, ($page-1)*$page_limit, $page_limit);
|
||||
|
||||
$return_data = [
|
||||
'page' =>$page,
|
||||
'page_limit' => $page_limit,
|
||||
'total_consumption' => $total_consumption,
|
||||
'count' => $count,
|
||||
'lists' => $rum_lists
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user