private function _updateLikeCount($typeid, $fromid, $count) { switch ($typeid) { case PwLikeContent::THREAD: Wind::import('SRV:forum.dm.PwTopicDm'); $dm = new PwTopicDm($fromid); $dm->setLikeCount($count); return Wekit::load('forum.PwThread')->updateThread($dm, PwThread::FETCH_MAIN); case PwLikeContent::POST: Wind::import('SRV:forum.dm.PwReplyDm'); $dm = new PwReplyDm($fromid); $dm->setLikeCount($count); return Wekit::load('forum.PwThread')->updatePost($dm); case PwLikeContent::WEIBO: Wind::import('SRV:weibo.dm.PwWeiboDm'); $dm = new PwWeiboDm($fromid); $dm->setLikeCount($count); return Wekit::load('weibo.PwWeibo')->updateWeibo($dm); case PwLikeContent::APP: Wind::import('SRV:like.dm.PwLikeSourceDm'); $dm = new PwLikeSourceDm($fromid); $dm->setLikeCount($count); return Wekit::load('like.PwLikeSource')->updateSource($dm); } }