Browse Source

修改分类

shish 2 years ago
parent
commit
a4153e581e
1 changed files with 18 additions and 0 deletions
  1. 18 0
      app-ghs/controllers/NotifyController.php

+ 18 - 0
app-ghs/controllers/NotifyController.php

@@ -19,6 +19,24 @@ class NotifyController extends BaseController
         util::complete('操作成功');
     }
 
+    //单个设置为已读 ssh 20231224
+    public function actionSetRead()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id'] ?? 0;
+        $notify = NotifyClass::getById($id, true);
+        if (empty($notify)) {
+            util::fail('没有找到通知');
+        }
+        $staffId = $this->shopAdminId;
+        if ($notify->staffId != $staffId) {
+            util::fail('不是你的通知哦');
+        }
+        $notify->read = 1;
+        $notify->save();
+        util::complete('操作成功');
+    }
+
     //通知列表 ssh 20230802
     public function actionList()
     {