zhanghua
2022-09-20 78515395d832445e5423895caaab21195cc12ac3
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
28
29
30
31
32
33
34
35
36
37
38
39
package com.ycl.controller.region;
 
 
import com.ycl.api.CommonResult;
import com.ycl.controller.BaseController;
import com.ycl.entity.region.SccgRegion;
import com.ycl.service.region.ISccgRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * <p>
 * 遂昌行政区域 前端控制器
 * </p>
 *
 * @author lyq
 * @since 2022-09-16
 */
@RestController
@RequestMapping("/sccg-region")
@Api(tags = "行政区域")
public class SccgRegionController extends BaseController {
 
    @Resource
    private ISccgRegionService iSccgRegionService;
 
    @ApiOperation("树结构")
    @GetMapping("/getTree")
    public CommonResult<List<SccgRegion>> getTree() {
        List<SccgRegion> treeList = iSccgRegionService.getTree();
        return CommonResult.success(treeList);
    }
}