friendManager = $friendManager; } public function getAllList(GetAllListMessage $message) { $page = $message->getPage(); $uid = Auth::auth(); $data = $this->friendManager->getAllList($uid, [ 'limit' => 20, 'page' => $page, ]); $message->setResponse($data); } public function getApplyAllList(GetApplyAllListMessage $message) { $page = $message->getPage() ?: 1; $uid = Auth::auth(); $pages = array( 'limit' => 20, 'page' => $page, ); $data = $this->friendManager->getApplyAllList($uid, $pages); $message->setResponse($data); } public function getApplyReceiveList(GetApplyReceiveListMessage $message) { $page = $message->getPage() ?: 1; $uid = Auth::auth(); $pages = array( 'limit' => 20, 'page' => $page ); $data = $this->friendManager->getReceiveList($uid, $pages); $message->setResponse($data); } public function getApplySendList(GetApplySendListMessage $message) { $page = $message->getPage() ?: 1; $uid = Auth::auth(); $pages = array( 'limit' => 20, 'page' => $page ); $data = $this->friendManager->getSendList($uid, $pages); $message->setResponse($data); } public function getEachLikeList(GetEachLikeListMessage $message) { $page = $message->getPage() ?: 1; $uid = Auth::auth(); $pages = array( 'limit' => 20, 'page' => $page ); $data = $this->friendManager->getEachLikeList($uid, $pages); $message->setResponse($data); } public function getStarList(GetStarListMessage $message) { $page = $message->getPage() ?: 1; $uid = Auth::auth(); $pages = array( 'limit' => 20, 'page' => $page ); $data = $this->friendManager->getStarList($uid, $pages); $message->setResponse($data); } public function getChatHistory(GetChatHistoryMessage $message) { $page = $message->getPage() ?: 1; $friendUid = $message->getFriendUid(); $uid = Auth::auth(); $pages = array( 'limit' => 20, 'page' => $page ); $data = $this->friendManager->getHistory($uid, $friendUid, $pages); $message->setResponse($data); } public function getUnreadCount(GetUnreadCountMessage $message) { $uid = Auth::auth(); $data = $this->friendManager->getUnreadCount($uid); $message->setResponse($data); } public function agreeApply(AgreeApplyMessage $message) { $uid = Auth::auth(); $applyUid = $message->getApplyUid(); $as = new ApplyService(); $as->agree($uid, $applyUid); } }