From ce4e9ff0d7505dcfe9aa65e964fd1d0dcd42210b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Fri, 9 Jan 2026 14:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E6=B5=81=E6=B0=B4=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index 95c356ad..e3a21497 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -484,14 +484,11 @@ class Room extends Model public function room_turnover_detail($userId,$room_id,$stime,$etime,$page,$page_limit) { //查看用户和房间的关系 $isOwner = 0; - $isHost = 0; $owner = db::name('vs_room')->where(['id' => $room_id])->value('user_id'); if($owner != $userId){ $host = db::name('vs_room_host')->where(['room_id' => $room_id ,'user_id' => $userId,'type' => 1,'delete_time' => null])->find(); if(!$host){ return ['code' => 1, 'msg' => '成功', 'data' => ['total_amount' => 0, 'total_earning' => 0,'list' => null]]; - }else{ - $isHost = 1; } }else{ $isOwner = 1; @@ -563,7 +560,7 @@ class Room extends Model }else{ $total_earning = db::name('user_earnings_log') ->where(['user_id' => $userId,'room_id' => $room_id,'change_type' => 19]) - ->where('createtime', 'between', [strtotime($stime), strtotime($etime)]) + ->where('createtime', 'between', [strtotime($stime), strtotime($etime.' 23:59:59')]) ->sum('earnings'); } return ['code' => 1, 'msg' => '成功', 'data' => ['total_amount' => $total_amount, 'total_earning' => $total_earning,'list' => $list_data_array]];