package com.dsk.cscec.controller;


import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.R;
import com.dsk.cscec.domain.vo.RegionVo;
import com.dsk.cscec.service.IDimAreaService;
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;

/**
 * (DimArea)表控制层
 *
 * @author lcl
 * @since 2023-12-13 13:45:22
 */
@RestController
@RequestMapping("/area")
public class DimAreaController extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private IDimAreaService baseService;

    /**
     * 获取地区树
     */
    @GetMapping("/all")
    public R<List<RegionVo>> allArea(){
        return R.ok(baseService.allArea());
    }
}

