getUser()->id; $offset = intval($request->get('offset')); $maxSize = intval($request->get('maxSize')); $after = $request->get('after'); if (empty($maxSize)) { $maxSize = self::MAX_SIZE_LIMIT; } $params = [ 'offset' => $offset, 'maxSize' => $maxSize, 'after' => $after, ]; $recordCollection = $this->getService('Notification')->getList($userId, $params); return (object) [ 'total' => $recordCollection->getTotal(), 'list' => $recordCollection->getValueMapList(), ]; } public function actionNotReadCount() { $userId = $this->getUser()->id; return $this->getService('Notification')->getNotReadCount($userId); } public function postActionMarkAllRead($params, $data, $request) { $userId = $this->getUser()->id; return $this->getService('Notification')->markAllRead($userId); } public function beforeExport() { throw new Error(); } public function beforeMassUpdate() { throw new Error(); } public function beforeCreateLink() { throw new Error(); } public function beforeRemoveLink() { throw new Error(); } public function beforeMerge() { throw new Error(); } }