From 8d8c4d90e9e305cf8fa6ec9bf5b650d007c61ceb Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Sun, 1 Aug 2021 00:45:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/Api/V1/ContactsApplyController.php | 5 ++--- app/Controller/WebSocketController.php | 1 - app/Traits/PagingTrait.php | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Controller/Api/V1/ContactsApplyController.php b/app/Controller/Api/V1/ContactsApplyController.php index f96618a..54a5dfa 100644 --- a/app/Controller/Api/V1/ContactsApplyController.php +++ b/app/Controller/Api/V1/ContactsApplyController.php @@ -44,9 +44,8 @@ class ContactsApplyController extends CController $params['friend_id'] = (int)$params['friend_id']; $user = $userService->findById($params['friend_id']); - if (!$user) { - return $this->response->fail('用户不存在!'); - } + + if (!$user) return $this->response->fail('用户不存在!'); $user_id = $this->uid(); $key = "{$user_id}_{$params['friend_id']}"; diff --git a/app/Controller/WebSocketController.php b/app/Controller/WebSocketController.php index 38f8dbc..940b8d7 100644 --- a/app/Controller/WebSocketController.php +++ b/app/Controller/WebSocketController.php @@ -24,7 +24,6 @@ use Swoole\Websocket\Frame; use Swoole\Http\Response; use Swoole\WebSocket\Server; use App\Service\SocketClientService; -use App\Model\Group\GroupMember; use App\Event\TalkEvent; diff --git a/app/Traits/PagingTrait.php b/app/Traits/PagingTrait.php index 4e1f7ae..c70c7ac 100644 --- a/app/Traits/PagingTrait.php +++ b/app/Traits/PagingTrait.php @@ -1,4 +1,5 @@