Ejemplo n.º 1
0
 public function getUnreadCircleConversNumAction()
 {
     $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->getUnreadCircleConversNum($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;
 }
Ejemplo n.º 2
0
 public function getUnreadCircleConversNumAction()
 {
     $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->getUnreadCircleConversNum($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;
 }