request->params([ ["students_id",""] ]); return success((new FeedbackService())->getPage($data)); } /** * 意见反馈详情 * @param int $id * @return \think\Response */ public function info(int $id){ return success((new FeedbackService())->getInfo($id)); } /** * 添加意见反馈 * @return \think\Response */ public function add(){ $data = $this->request->params([ ["students_id",0], ["content",""], ["images",""], ["mailbox",""], ]); $this->validate($data, 'addon\zhjw\app\validate\feedback\Feedback.add'); $id = (new FeedbackService())->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], ["content",""], ["images",""], ["mailbox",""], ]); $this->validate($data, 'addon\zhjw\app\validate\feedback\Feedback.edit'); (new FeedbackService())->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 意见反馈删除 * @param $id 意见反馈id * @return \think\Response */ public function del(int $id){ (new FeedbackService())->del($id); return success('DELETE_SUCCESS'); } public function getStudentsAll(){ return success(( new FeedbackService())->getStudentsAll()); } }