Example #1
0
 public function actionDelete()
 {
     $params = yii::$app->request->getBodyParams();
     if (empty($params['application_id'])) {
         return Message::say(Message::E_ERROR, null, "应聘id不能为空");
     }
     $model = Applications::find()->where('application_id=:id', [':id' => $params['application_id']])->one();
     if ($model == null) {
         //            throw new NotFoundHttpException('您访问的事件没有找到');
         return Message::say(Message::E_ERROR, null, "该应聘不存在");
     } else {
         $model->delete();
         return Message::say(Message::E_OK, null, "删除成功");
     }
 }
Example #2
0
 public function actionApplicationdetail()
 {
     $params = yii::$app->request->getQueryParams();
     if (empty($params['recruitment_id'])) {
         return Message::say(Message::E_ERROR, null, "招聘id不能为空");
     }
     $query = Applications::find()->where(["recruitment_id" => $params['recruitment_id']]);
     return new yii\data\ActiveDataProvider(['query' => $query]);
 }