公会流水bug修改
This commit is contained in:
@@ -82,7 +82,7 @@ class Guild extends adminApi
|
||||
}
|
||||
$list[$k]['guild_logo'] = $v['cover'];
|
||||
//当日流水
|
||||
$list[$k]['today_money'] = model('Guild')->getTodayMoney($v['id'],$search_stime,$search_etime);//$v['income'];
|
||||
$list[$k]['today_money'] = $v['income'];//model('Guild')->getTodayMoney($v['id'],$search_stime,$search_etime);
|
||||
$list[$k]['is_show'] = $v['is_show'];
|
||||
$list[$k]['is_show_str'] = $v['is_show'] == 1 ? '显示' : '隐藏';
|
||||
$list[$k]['status'] = $v['status'];
|
||||
@@ -499,20 +499,20 @@ class Guild extends adminApi
|
||||
->where(['a.guild_id'=>$guild_id])->where($where)->count();
|
||||
$list = db::name($this->table_guild_user)->alias('a')
|
||||
->join('vs_room b', 'a.room_id = b.id', 'left')
|
||||
->where(['a.guild_id'=>$guild_id])
|
||||
->where($where)
|
||||
->order('a.coin desc')
|
||||
->page($page, $page_limit)
|
||||
->where(['a.guild_id'=>$guild_id])->where($where)
|
||||
// ->page($page, $page_limit)
|
||||
->select();
|
||||
if(!$list){
|
||||
return V(0,"暂无数据");
|
||||
}
|
||||
$rum_lists = [];
|
||||
//总流水
|
||||
// $total_consumption = 0;
|
||||
$total_consumption = 0;
|
||||
foreach ($list as $k=>$v){
|
||||
$search_stime = $search_stime_str;
|
||||
$search_etime = $search_etime_str;
|
||||
// $search_stime = date('Y-m-d H:i:s','1761554521');
|
||||
// $search_etime = date('Y-m-d H:i:s','1766564906');
|
||||
if($search_stime!=""){
|
||||
if($v['apply_time'] && strtotime($search_stime) < $v['apply_time']) {
|
||||
$search_stime = date('Y-m-d H:i:s',$v['apply_time']);
|
||||
@@ -539,9 +539,9 @@ class Guild extends adminApi
|
||||
$rum_lists[$k]['room_name']=$room_info['room_name']?? '';
|
||||
$rum_lists[$k]['room_cover']=$room_info['room_cover']?? '';
|
||||
//房间流水
|
||||
$rum_lists[$k]['consumption']= $v['coin'];//model('Room')->getRoomFlow($v['room_id'],$search_stime,$search_etime);
|
||||
$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'];
|
||||
$total_consumption += $rum_lists[$k]['consumption'];
|
||||
//幸运币统计
|
||||
$where_lucky = [];
|
||||
if($search_stime !== ''){
|
||||
@@ -555,11 +555,11 @@ class Guild extends adminApi
|
||||
}
|
||||
$rum_lists[$k]['lucky_coin'] = db::name('vs_room_luck_value')->where('room_id',$room_id)->where($where_lucky)->sum('luck_value');
|
||||
}
|
||||
// usort($rum_lists, function($a, $b) {
|
||||
// return $b['consumption'] - $a['consumption'];
|
||||
// });
|
||||
// //分页
|
||||
// $rum_lists = array_slice($rum_lists, ($page-1)*$page_limit, $page_limit);
|
||||
usort($rum_lists, function($a, $b) {
|
||||
return $b['consumption'] - $a['consumption'];
|
||||
});
|
||||
//分页
|
||||
$rum_lists = array_slice($rum_lists, ($page-1)*$page_limit, $page_limit);
|
||||
//幸运币统计
|
||||
|
||||
$where_lucky = [];
|
||||
@@ -575,7 +575,7 @@ class Guild extends adminApi
|
||||
$return_data = [
|
||||
'page' =>$page,
|
||||
'page_limit' => $page_limit,
|
||||
'total_consumption' => model('Guild')->getGuildFlow($guild_id,0,strtotime($search_stime_str), strtotime($search_etime_str)),
|
||||
'total_consumption' => $total_consumption,
|
||||
'total_lucky_coin' => db::name('vs_room_luck_value')->whereIn('room_id',$room_ids)->where($where_lucky)->sum('luck_value'),
|
||||
'count' => $count,
|
||||
'lists' => $rum_lists
|
||||
|
||||
Reference in New Issue
Block a user