1
luodangjia
2025-01-22 759e0540a7ca20f33ab265d00e7944e4f18a562b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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<List<Region>> getRegionTree() {
        return R.ok(regionService.getRegionTree());
    }
}