request->params([ ["user_id",""] ]); return success((new UserFeedbackService())->getPage($data)); } /** * 用户反馈信息详情 * @param int $id * @return \think\Response */ public function info(int $id){ return success((new UserFeedbackService())->getInfo($id)); } /** * 添加用户反馈信息 * @return \think\Response */ public function add(){ $data = $this->request->params([ ["user_id",0], ["feedback_text",""], ["attachment_url",""], ]); $this->validate($data, 'app\validate\user_feedback\UserFeedback.add'); $id = (new UserFeedbackService())->add($data); return success('ADD_SUCCESS', ['id' => $id]); } /** * 用户反馈信息编辑 * @param $id 用户反馈信息id * @return \think\Response */ public function edit(int $id){ $data = $this->request->params([ ["user_id",0], ["feedback_text",""], ["attachment_url",""], ]); $this->validate($data, 'app\validate\user_feedback\UserFeedback.edit'); (new UserFeedbackService())->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 用户反馈信息删除 * @param $id 用户反馈信息id * @return \think\Response */ public function del(int $id){ (new UserFeedbackService())->del($id); return success('DELETE_SUCCESS'); } public function getCustomerResourcesAll(){ return success(( new UserFeedbackService())->getCustomerResourcesAll()); } }