function bannerStatisticsAction() { $request = $this->getRequest(); if ('POST' == $request->getMethod()) { $ssotoken = $this->post()->get("ssotoken"); $bannerId = $this->post()->get("bannerId"); } else { $ssotoken = $this->get("ssotoken"); $bannerId = $this->get("bannerId"); } if (!$ssotoken || !$bannerId) { $this->displayJsonUdo(Common_Error::ERROR_PARAM); } //获取用户id $userModel = new UserModel(); $uid = $userModel->getUserId($ssotoken); if (is_array($uid)) { $this->displayJsonUdo(Common_Error::INVALID_TOKEN, "", $uid['msg']); } $bannerStatistics = new SchoolModel(); $insertResult = $bannerStatistics->bannerStatistics($uid, $bannerId); if (!$insertResult) { $this->displayJsonUdo(Common_Error::ERROR_FAIL); } $this->displayJsonUdo(Common_Error::ERROR_SUCCESS); }