request->params([ ["students_id",""], ["height",""], ["weight",""], ["update_time",""] ]); return success((new ZhjwStudentsSurveyService())->getPage($data)); } /** * 学员体测详情 * @param int $id * @return \think\Response */ public function info(int $id){ return success((new ZhjwStudentsSurveyService())->getInfo($id)); } /** * 添加学员体测 * @return \think\Response */ public function add(){ $data = $this->request->params([ ["students_id",0], ["height",0.00], ["weight",0.00], ["content",""], ]); $this->validate($data, 'app\validate\zhjw_students_survey\ZhjwStudentsSurvey.add'); $id = (new ZhjwStudentsSurveyService())->add($data); return success('ADD_SUCCESS', ['id' => $id]); } /** * 学员体测编辑 * @param $id 学员体测id * @return \think\Response */ public function edit(int $id){ $data = $this->request->params([ ["students_id",0], ["height",0.00], ["weight",0.00], ["content",""], ]); $this->validate($data, 'app\validate\zhjw_students_survey\ZhjwStudentsSurvey.edit'); (new ZhjwStudentsSurveyService())->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 学员体测删除 * @param $id 学员体测id * @return \think\Response */ public function del(int $id){ (new ZhjwStudentsSurveyService())->del($id); return success('DELETE_SUCCESS'); } public function getStudentsAll(){ return success(( new ZhjwStudentsSurveyService())->getStudentsAll()); } }