From e53242613b634916bb2f7939bc260ee683c2236e Mon Sep 17 00:00:00 2001 From: weifashi <605403358@qq.com> Date: Wed, 10 Jan 2024 18:59:47 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=20=E5=B9=B4=E5=BA=A6=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=09=20-=20=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/UsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index f8a226bf6..883bdd875 100755 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -2115,7 +2115,7 @@ class UsersController extends AbstractController 'latest_online_time' => date( 'Y-m-d H:i:s', UserCheckinRecord::whereUserid($user->userid) - ->whereYear('created_at', $year) + ->whereYear(DB::raw('from_unixtime(report_time)'), $year) ->where(function ($query) { $query->where(function ($query) { $query->whereRaw('HOUR(FROM_UNIXTIME(report_time)) < 6');