文件名从 assess-admin/src/main/java/com/gkhy/assess/admin/controller/SysRegionController.java 修改 |
| | |
| | | package com.gkhy.assess.admin.controller; |
| | | package com.gkhy.assess.admin.controller.web; |
| | | |
| | | import com.gkhy.assess.common.annotation.RepeatSubmit; |
| | | import com.gkhy.assess.common.api.CommonResult; |
| | | import com.gkhy.assess.system.domain.SysRegion; |
| | | import com.gkhy.assess.system.service.SysRegionService; |
| | |
| | | @Autowired |
| | | private SysRegionService regionService; |
| | | |
| | | @ApiOperation(value = "地区列表(树形结构)") |
| | | @ApiOperation(value = "地区列表(树形结构),默认返回疆内数据") |
| | | @GetMapping("/regionTree") |
| | | public CommonResult regionTree(SysRegion region){ |
| | | return CommonResult.success(regionService.regionTree(region)); |
| | |
| | | } |
| | | |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "新增地区") |
| | | @PostMapping("/addRegion") |
| | | public CommonResult addLaw(@Validated @RequestBody SysRegion region){ |
| | |
| | | } |
| | | |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "编辑地区") |
| | | @PutMapping("/editRegion") |
| | | public CommonResult editLaw(@Validated @RequestBody SysRegion region){ |
| | |
| | | } |
| | | |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "删除地区") |
| | | @PutMapping("/remove/{regionId}") |
| | | @DeleteMapping("/remove/{regionId}") |
| | | public CommonResult removeRegion(@PathVariable(name = "regionId")Long regionId){ |
| | | return CommonResult.success(regionService.deleteRegionById(regionId)); |
| | | } |