request->params([ ["campus_id",""] ]); return success((new SixSpeedModificationLogService())->getPage($data)); } /** * 六一速修改记录详情 * @param int $id * @return \think\Response */ public function info(int $id){ return success((new SixSpeedModificationLogService())->getInfo($id)); } /** * 添加六一速修改记录 * @return \think\Response */ public function add(){ $data = $this->request->params([ ["campus_id",0], ["staff_id",0], ["modified_field",""], ["old_value",""], ["new_value",""], ]); $this->validate($data, 'app\validate\six_speed_modification_log\SixSpeedModificationLog.add'); $id = (new SixSpeedModificationLogService())->add($data); return success('ADD_SUCCESS', ['id' => $id]); } /** * 六一速修改记录编辑 * @param $id 六一速修改记录id * @return \think\Response */ public function edit(int $id){ $data = $this->request->params([ ["campus_id",0], ["staff_id",0], ["modified_field",""], ["old_value",""], ["new_value",""], ]); $this->validate($data, 'app\validate\six_speed_modification_log\SixSpeedModificationLog.edit'); (new SixSpeedModificationLogService())->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 六一速修改记录删除 * @param $id 六一速修改记录id * @return \think\Response */ public function del(int $id){ (new SixSpeedModificationLogService())->del($id); return success('DELETE_SUCCESS'); } public function getCampusAll(){ return success(( new SixSpeedModificationLogService())->getCampusAll()); } public function getPersonnelAll(){ return success(( new SixSpeedModificationLogService())->getPersonnelAll()); } }