From 1f996ab38437acbf2eba647b67ec600e03eb391e Mon Sep 17 00:00:00 2001 From: koogua Date: Mon, 12 Dec 2022 16:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=80=9A=E7=9F=A5=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E4=B8=BA=E5=B7=B2=E8=AF=BB=EF=BC=8C=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E5=BD=92=E9=9B=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Logic/User/Console/NotificationRead.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Services/Logic/User/Console/NotificationRead.php b/app/Services/Logic/User/Console/NotificationRead.php index d33c5f20..5389db2a 100644 --- a/app/Services/Logic/User/Console/NotificationRead.php +++ b/app/Services/Logic/User/Console/NotificationRead.php @@ -17,6 +17,12 @@ class NotificationRead extends LogicService { $user = $this->getLoginUser(); + if ($user->notice_count == 0) return; + + $user->notice_count = 0; + + $user->update(); + $notifyRepo = new NotificationRepo(); $notifyRepo->markAllAsViewed($user->id);