From c5e88307bd7229b7d2ccdd3a7e10fef02204ffe7 Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Fri, 21 Jun 2019 18:07:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E9=80=9A=E7=9F=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/project/controller/Notify.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/application/project/controller/Notify.php b/application/project/controller/Notify.php index 0af43cd..cd86e2f 100644 --- a/application/project/controller/Notify.php +++ b/application/project/controller/Notify.php @@ -84,6 +84,15 @@ class Notify extends BasicApi $this->error("操作失败,请稍候再试!"); } + /** + * 清空所有消息 + */ + public function _clearAll() + { + \app\common\Model\Notify::update(['is_read' => 1, 'read_time' => nowTime()], ['to' => getCurrentMember()['code'], 'is_read' => 0]); + $this->success(); + } + /** * 批量删除 * @throws \Exception @@ -116,11 +125,10 @@ class Notify extends BasicApi } - /** * 删除指定资源 * - * @param int $id + * @param int $id * @return \think\Response */ public function delete($id = 0)