Exemple #1
0
 function enterRecommendationAction()
 {
     $request = $this->getRequest();
     if ('POST' == $request->getMethod()) {
         $ssotoken = $this->post()->get("ssotoken");
         $recId = $this->post()->get("recId");
     } else {
         $ssotoken = $this->get("ssotoken");
         $recId = $this->get("recId");
     }
     if (!$ssotoken || !$recId) {
         $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']);
     }
     $actionId = 3;
     $rec = array(0 => array("recId" => $recId));
     $schoolModel = new SchoolModel();
     $schoolModel->recLog($uid, $actionId, $rec, 0);
     $this->displayJsonUdo(Common_Error::ERROR_SUCCESS);
 }