From 33177f26cb0c4147b707028df7cdb757fe1a0181 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Thu, 24 Sep 2020 12:19:41 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=96=B0=E5=A2=9E=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/system/model/search/LoginLogSearch.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/catch/system/model/search/LoginLogSearch.php b/catch/system/model/search/LoginLogSearch.php index de32308..77e231b 100644 --- a/catch/system/model/search/LoginLogSearch.php +++ b/catch/system/model/search/LoginLogSearch.php @@ -4,18 +4,13 @@ namespace catchAdmin\system\model\search; trait LoginLogSearch { - public function searchLoginNameAttr($query, $value, $data) + public function searchStartAtAttr($query, $value, $data) { - return $query->whereLike('login_name', $value); + return $query->whereTime('login_at', '>=', strtotime($value)); } - public function searchLoginIpAttr($query, $value, $data) + public function searchEndAtAttr($query, $value, $data) { - return $query->whereLike('login_ip', $value); - } - - public function searchLoginAtAttr($query, $value, $data) - { - return $query->whereTime('login_at', 'between', $value); + return $query->whereTime('login_at', '<=', strtotime($value)); } }