| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/add", method = RequestMethod.POST) |
| | | public RestResponse add(@RequestBody @Valid String name) { |
| | | return RestResponse.ok(departmentService.add(name)); |
| | | public RestResponse add(@RequestBody @Valid Department model) { |
| | | return RestResponse.ok(departmentService.add(model)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/update", method = RequestMethod.POST) |
| | |
| | | |
| | | @RequestMapping(value = "/get/{id}", method = RequestMethod.POST) |
| | | public RestResponse update(@PathVariable Integer id) { |
| | | return RestResponse.ok(departmentService.getById(id)); |
| | | return RestResponse.ok(departmentService.getByIdVO(id)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getUserByDepartment/{id}", method = RequestMethod.POST) |