package cn.iocoder.yudao.module.jx.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
import cn.iocoder.yudao.module.jx.service.ILJRegionService;
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.Map;

/**
 * 省市区信息
 */
@RestController
@RequestMapping("/province/region")
public class LJRegionController extends BaseController {
    @Autowired
    private ILJRegionService regionService;

    /**
     * 查询省市级信息
     * @return
     */
    @GetMapping("/tree")
    public CommonResult tree(){
        Map<String, Object> map = regionService.selectRegion();
        return success(map);
    }
}
