コード例 #1
0
 protected function findModel($id)
 {
     $model = Recruitments::find()->where('recruitment_id=:id', [':id' => $id])->one();
     if ($model !== null) {
         return $model;
     } else {
         //            throw new NotFoundHttpException('您访问的事件没有找到');
         return Message::say(Message::E_ERROR, null, "该招聘不存在");
     }
 }
コード例 #2
0
ファイル: BusinessController.php プロジェクト: szucyq/zhaopin
 public function actionRecruitmentdetail()
 {
     $params = yii::$app->request->getQueryParams();
     if (empty($params['recruitment_id'])) {
         return Message::say(Message::E_ERROR, null, "招聘id不能为空");
     }
     $query = Recruitments::find()->where(["recruitment_id" => $params['recruitment_id']]);
     return new yii\data\ActiveDataProvider(['query' => $query]);
 }