From c283e45b10bccc9fe301aa9124f4a4f281e39d30 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 27 Apr 2020 12:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/UserService.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Base/Service/UserService.class.php b/Application/Base/Service/UserService.class.php index 125371b7..fc5350e3 100644 --- a/Application/Base/Service/UserService.class.php +++ b/Application/Base/Service/UserService.class.php @@ -66,7 +66,7 @@ class UserService protected function isBan($ip, $deviceNum) { - $ban = M('device_bans','tab_')->select(['id'])->where(['tag' => ['in', [$ip, $deviceNum]]])->limit(1)->find(); + $ban = M('device_bans','tab_')->field(['id'])->where(['tag' => ['in', [$ip, $deviceNum]]])->limit(1)->find(); if (empty($ban)) { return false; } @@ -92,7 +92,7 @@ class UserService return ['status' => false, 'message' => '账号或密码错误']; } - $testResource = M('test_resource','tab_')->select(['device_number'])->where('user_id=%s and apply_status=2', $user['id'])->find(); //测试资源(扶持号) + $testResource = M('test_resource','tab_')->field(['device_number'])->where('user_id=%s and apply_status=2', $user['id'])->find(); //测试资源(扶持号) if ($testResource) { if ($this->isIpWarning($user, $testResource, $deviceNum)) { $this->ipWarningLog($user, $testResource, $deviceNum);