public function getLogoAction() { $request = $this->get("request"); $da = $this->get("we_data_access"); $type = trim($request->get('type')); $id = trim($request->get('id')); if ($type == "" || $id == "") { return $this->responseJson($request, Utils::WrapResultError('类型或id不能为空')); } if ($type == "STAFF") { $staffMgr = new Staff($da, $this->get("we_data_access_im"), $id, $this->container->get('logger'), $this->container); $data = $staffMgr->getInfo(); if (empty($data)) { return $this->responseJson($request, Utils::WrapResultError('无效的员工jid')); } return $this->responseJson($request, Utils::WrapResultOK($data['photo_path'])); } else { if ($type == "GROUP") { $mgr = new \Justsy\BaseBundle\Management\GroupMgr($da, $this->get("we_data_access_im"), $this->container); $data = $mgr->GetByIM($id); if (empty($data)) { return $this->responseJson($request, Utils::WrapResultError('无效的员工jid')); } return $this->responseJson($request, Utils::WrapResultOK($data['logo'])); } } return $this->responseJson($request, Utils::WrapResultError('无效的类型')); }