public function getOfficialTrendWinAction($conv_root_id) { $FILE_WEBSERVER_URL = $this->container->getParameter('FILE_WEBSERVER_URL'); $user = $this->get('security.context')->getToken()->getUser(); $da = $this->get('we_data_access'); $conv = new \Justsy\BaseBundle\Business\Conv(); $ds = $conv->getOfficialTrend($da, $user, $conv_root_id, $FILE_WEBSERVER_URL); if (count($ds["we_convers_list"]["rows"]) == 0) { return new Response(""); } $isGroup = $ds["we_convers_list"]["rows"][0]["post_to_group"]; if ($isGroup != "ALL") { //获取群组logo $groupmgr = new \Justsy\BaseBundle\Management\GroupMgr($da, null); $groupdata = $groupmgr->Get($isGroup); if ($groupdata != null) { $ds["we_convers_list"]["rows"][0]["en_logo_path"] = $FILE_WEBSERVER_URL . (empty($groupdata["group_photo_path"]) ? "default_group.png" : $groupdata["group_photo_path"]); } } else { //判断是否是非企业圈子 $circleid = $ds["we_convers_list"]["rows"][0]["post_to_circle"]; if ($user->get_circle_id("") != $circleid) { $circlemgr = new \Justsy\BaseBundle\Management\CircleMgr($da, null); $data = $circlemgr->Get($circleid); if ($data != null) { $ds["we_convers_list"]["rows"][0]["en_logo_path"] = $FILE_WEBSERVER_URL . (empty($data["logo_path"]) ? "default_cirle.png" : $data["logo_path"]); } } } if ($ds["we_convers_list"]["rows"][0]["auth_level"] != 'S') { $ds["we_convers_list"]["rows"][0]["vip_level"] = \Justsy\BaseBundle\Common\ExperienceLevel::getLevel($ds["we_convers_list"]["rows"][0]["total_point"]); } else { $ds["we_convers_list"]["rows"][0]["vip_level"] = "1"; // } $css_level = (int) ($ds["we_convers_list"]["rows"][0]["we_level"] / 10); $para = array('this' => $this, 'ds' => $ds, 'css_level' => $css_level, "trend" => $this->getRequest()->get("trend")); return $this->render('JustsyBaseBundle:CDisplayArea:officialtrend_win.html.twig', $para); }