package cn.com.ty.lift.system.user.controller;

import cn.com.ty.lift.common.model.AreaCode;
import cn.com.ty.lift.system.user.service.IAreaCodeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author huangyuan
 * @date 2019-12-03
 * @description 区域
 */
@RestController
@RequestMapping("/areacode")
public class AreaCodeController {

    @Resource
    private IAreaCodeService areaCodeService;

    /**
     * @description 获取所有的区域数据
     * @date 2019/11/27 10:03 AM
     * @param
     * @return
     */
    @RequestMapping("/all")
    public List<AreaCode> all(){
        return areaCodeService.areaTree();
    }

}