From a8f0ea6c9e5e2cab65a4b15df2a3206fe5695a95 Mon Sep 17 00:00:00 2001 From: lq Date: Tue, 30 Dec 2025 10:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E4=B8=8D?= =?UTF-8?q?=E5=8A=A0=E8=AF=8A=E6=89=80=E9=99=90=E5=88=B6=EF=BC=88=E7=BB=99?= =?UTF-8?q?=E4=BA=92=E8=81=94=E7=BD=91=E5=8C=BB=E9=99=A2=E8=BD=AC=E7=9A=84?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=A4=8D=E8=AF=8A=E7=95=99=E5=8F=A3=E5=AD=90?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/v1/controllers/SystemNoticeController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/member/modules/v1/controllers/SystemNoticeController.php b/member/modules/v1/controllers/SystemNoticeController.php index 3be9e0c..be2871b 100644 --- a/member/modules/v1/controllers/SystemNoticeController.php +++ b/member/modules/v1/controllers/SystemNoticeController.php @@ -123,7 +123,7 @@ class SystemNoticeController extends BaseAppController 'scene_type' => 1, 'user_id' => \Yii::$app->user->identity->id, 'base_type' => 6 - ])->groupBy('notice_at')->orderBy('notice_at DESC'); + ])->orderBy('notice_at DESC'); $this->field = [ @@ -171,18 +171,18 @@ class SystemNoticeController extends BaseAppController $type = $post['type']; switch ($type) { case 'all': - \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute(); + \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute(); \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=99 AND user_id='.\Yii::$app->user->identity->id)->execute(); break; case 'system': - \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND (base_type=3 or base_type=4 or base_type=5 or base_type=7) AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute(); + \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND (base_type=3 or base_type=4 or base_type=5 or base_type=7) AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute(); \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=99 AND user_id='.\Yii::$app->user->identity->id)->execute(); break; case 'order': - \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=1 AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute(); + \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=1 AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute(); break; case 'doctor_news': - \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=6 AND user_id='.\Yii::$app->user->identity->id.' AND store_id='.$post['store_id'])->execute(); + \Yii::$app->db->createCommand()->update(SystemNotice::tableName(), ['read_status' => '1'], 'read_status=0 AND scene_type=1 AND base_type=6 AND user_id='.\Yii::$app->user->identity->id/*.' AND store_id='.$post['store_id']*/)->execute(); break; default: throw new Exception('错误的type');