| | |
| | | import com.ycl.entity.region.SccgRegion; |
| | | import com.ycl.service.region.ISccgRegionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @ApiOperation("获取子类") |
| | | @GetMapping("/getChildren/{parentId}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "parentId",value = "顶级parentId=0") |
| | | }) |
| | | public CommonResult<List<SccgRegion>> getChildren(@PathVariable Long parentId) { |
| | | List<SccgRegion> treeList = iSccgRegionService.getChildren(parentId); |
| | | return CommonResult.success(treeList); |
| | | } |
| | | } |