package com.ruoyi.system.controller; import com.ruoyi.common.core.domain.R; import com.ruoyi.system.api.domain.Region; import com.ruoyi.system.service.RegionService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @RequestMapping("/region") @Tag(name = "区域管理") public class RegionController { @Autowired private RegionService regionService; @GetMapping("/tree") @Operation(summary = "获取区域树") public R> getRegionTree() { return R.ok(regionService.getRegionTree()); } }