package com.ruoyi.hezhi.api.kaoshi;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.hezhi.domain.TbRegion;
import com.ruoyi.hezhi.service.ITbRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

/**
 * 行政区域Controller
 *
 * @author ruoyi
 * @date 2024-10-21
 */
@RestController
@RequestMapping("/api/pc/region")
public class ApiRegionController extends BaseController
{
    @Autowired
    private ITbRegionService tbRegionService;

    /**
     * 查询行政区域列表
     */
    @GetMapping("/treeList")
    public AjaxResult treeList(TbRegion tbRegion)
    {
        List<TbRegion> list = tbRegionService.selectTbRegionTreeList(tbRegion);
        return success(list);
    }

}
