| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("监管单位分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<RegulatoryUnitVO>> pageList(@RequestBody DepartmentQuery query) { |
| | | return R.ok(sysDepartmentService.pageRegulatoryUnitList(query)); |
| | | } |
| | |
| | | * |
| | | * @param dto |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增监管单位") |
| | | @PostMapping("/add") |
| | | public R<?> add(@Valid @RequestBody RegulatoryUnitDTO dto) { |
| | | sysDepartmentService.addRegulatoryUnit(dto); |
| | | return R.ok(); |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑监管单位") |
| | | @PostMapping("/edit") |
| | | public R<?> edit(@Valid @RequestBody RegulatoryUnitDTO dto) { |
| | | sysDepartmentService.editRegulatoryUnit(dto); |
| | | return R.ok(); |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail/{id}") |
| | | @ApiOperation("监管单位详情") |
| | | @GetMapping("/detail/{id}") |
| | | public R<RegulatoryUnitVO> detail(@ApiParam(name = "id", value = "监管单位id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(sysDepartmentService.getRegulatoryUnitDetailById(id)); |
| | | } |
| | |
| | | * |
| | | * @param id |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation("删除监管单位") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delete(@ApiParam(name = "id", value = "监管单位id", required = true) @PathVariable("id") Long id) { |
| | | sysDepartmentService.deleteRegulatoryUnit(id); |
| | | return R.ok(); |