Ejemplo n.º 1
0
 public function microfanslistAction($network_domain)
 {
     $conn = $this->get('we_data_access');
     $conn_im = $this->get('we_data_access_im');
     $userinfo = $this->get('security.context')->getToken()->getUser();
     $logger = $this->get("logger");
     $getRequest = $this->getRequest();
     $MicroAccountMgr = new MicroAccountMgr($conn, $conn_im, $userinfo, $logger, $this->container);
     $micro_account = $getRequest->get("micro_number");
     $micro_name = $getRequest->get("micro_name");
     $micro_concern_approval = $getRequest->get("micro_concern_approval");
     $micro_type = $getRequest->get("micro_type");
     $micro_page_size = $getRequest->get("micro_pagesize");
     $micro_page_index = $getRequest->get("micro_pageindex");
     $groupid = $getRequest->get("groupid");
     if (empty($groupid)) {
         $groupid = 0;
     }
     $txtsearch = $getRequest->get("txtsearch");
     if (empty($micro_account)) {
         $txtsearch = "";
         $micro_name = "";
         $micro_concern_approval = false;
         $micro_type = 0;
         $micro_page_size = 10;
         $micro_page_index = 1;
     }
     $micro_fans["micro_concern_approval"] = $micro_concern_approval;
     $micro_fans["micro_type"] = $micro_type;
     $micro_fans["micro_pageindex"] = $micro_page_index;
     $micro_fans["micro_page_size"] = $micro_page_size;
     $micro_fans["curr_network_domain"] = $network_domain;
     $micro_fans["txtsearch"] = $txtsearch;
     $micro_fans["micro_name"] = $micro_name;
     $micro_fans["micro_account"] = $micro_account;
     $micro_fans["groupid"] = $groupid;
     $data = $MicroAccountMgr->get_micro_fans($micro_account, $txtsearch, $micro_page_size, $micro_page_index, $groupid);
     //粉丝总记录数
     $micro_fans["micro_fans_count"] = $data["micro_fans_count"];
     //最大页数
     $micro_fans["micro_page_max_index"] = $data["micro_page_max_index"];
     //粉丝列表
     $micro_fans["micro_fans_data"] = $data["micro_fans_data"];
     //var_dump($data["micro_fans_data"]);
     $micro_fans_ungrouped_count = $MicroAccountMgr->get_fans_ungrouped_count($micro_account);
     //未分组成员数
     $micro_fans["micro_fans_ungrouped_count"] = $micro_fans_ungrouped_count["max_count"] - $micro_fans_ungrouped_count["group_count"];
     $micro_fans["micro_fans_max_count"] = $micro_fans_ungrouped_count["max_count"];
     $groupdata = $MicroAccountMgr->grouplist($micro_account);
     //分组数据集合
     $micro_fans["micro_fans_groupdata"] = $groupdata;
     return $this->render('JustsyBaseBundle:EnterpriseSetting:microfanslist.html.twig', $micro_fans);
 }