Esempio n. 1
0
 public function getUnreadGroupConversNumAction()
 {
     $re = array("returncode" => ReturnCode::$SUCCESS);
     $user = $this->get('security.context')->getToken()->getUser();
     $request = $this->get("request");
     $filter = $request->get('filter');
     $ehc = new EnterpriseHomeController();
     $ehc->setContainer($this->container);
     try {
         $ds = $ehc->getUnreadGroupConversNum($user->getUserName(), $filter);
         $re["conv_nums"] = $ds["we_convers_list"]["rows"];
     } catch (Exception $e) {
         $re["returncode"] = ReturnCode::$SYSERROR;
     }
     $response = new Response(json_encode($re));
     $response->headers->set('Content-Type', 'text/json');
     return $response;
 }
Esempio n. 2
0
 public function getUnreadGroupConversNumAction()
 {
     $re = array("returncode" => ReturnCode::$SUCCESS);
     $request = $this->getRequest();
     $check = $this->accessCheck();
     if ($check['returncode'] != ReturnCode::$SUCCESS) {
         return $this->responseJson($request, $check);
     }
     $user = $check['data']->getSessionUser();
     $filter = $request->get('filter');
     $ehc = new EnterpriseHomeController();
     $ehc->setContainer($this->container);
     try {
         $ds = $ehc->getUnreadGroupConversNum($user->getUserName(), $filter);
         $re["conv_nums"] = $ds["we_convers_list"]["rows"];
     } catch (Exception $e) {
         $re["returncode"] = ReturnCode::$SYSERROR;
     }
     $response = new Response(json_encode($re));
     $response->headers->set('Content-Type', 'text/json');
     return $response;
 }