package cn.com.ty.lift.business.project.dao.mapper;

import cn.com.ty.lift.business.project.dao.entity.AreaCode;
import cn.com.ty.lift.business.project.dao.entity.model.AreaCodeDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 行政区划 Mapper 接口
 * </p>
 *
 * @author wang-hai-cheng
 * @since 2019-12-18
 */
public interface AreaCodeMapper extends BaseMapper<AreaCode> {

    @Select("SELECT code,name FROM area_code WHERE parent = #{code}")
    List<AreaCodeDTO> queryAreaList(String code);
}
