public function indexAction($name) { $user = $this->get('security.context')->getToken()->getUser(); $this->photo_url = $this->container->getParameter('FILE_WEBSERVER_URL') . $user->photo_path_big; $this->InfoCompletePercent = $this->GetInfoCompletePercent($user->getUsername()); //发升级通知 if ($user->level > 1 && $user->level > $user->we_level) { $user->we_level = $user->level; $sqls = array(); $all_params = array(); $sql = "update we_staff set we_level = ? where login_account=?"; $params = array(); $params[] = (string) $user->level; $params[] = (string) $user->getUserName(); $sqls[] = $sql; $all_params[] = $params; $da = $this->get('we_data_access'); $ds = $da->ExecSQLs($sqls, $all_params); $conv_id = \Justsy\BaseBundle\DataAccess\SysSeq::GetSeqNextValue($da, "we_convers_list", "conv_id"); $conv_content = "【喜讯】@{$user->nick_name} 的Wefafa等级已升至 {$user->level} 级![强] "; $circle_id = $user->get_circle_id($user->edomain); $group_id = "ALL"; $conv = new \Justsy\BaseBundle\Business\Conv(); $conv->newSysTrend($da, $conv_id, $conv_content, $circle_id, $group_id, array(), array()); } return $this->render('JustsyBaseBundle:CPerBaseInfo:index.html.twig', array('this' => $this)); }