瀏覽代碼

全部标记已读

shish 3 年之前
父節點
當前提交
07113813ce
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app-ghs/controllers/NotifyController.php

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

@@ -3,6 +3,7 @@
 namespace ghs\controllers;
 
 use bizGhs\notify\classes\NotifyClass;
+use bizGhs\shop\classes\ShopAdminClass;
 use common\components\util;
 use Yii;
 
@@ -13,6 +14,8 @@ class NotifyController extends BaseController
     public function actionAllRead()
     {
         NotifyClass::updateByCondition(['mainId' => $this->mainId, 'staffId' => $this->shopAdminId], ['read' => 1]);
+        $staffId = $this->shopAdminId;
+        ShopAdminClass::updateById($staffId, ['notifyNum' => 0]);
         util::complete('操作成功');
     }