package com.softwarebr.nunu.dao.oper;

import com.brframework.commondb.core.CommonRepository;
import com.softwarebr.nunu.entity.oper.Area;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @date: 2019-10-21 17:33:17
 * @author: lilin
 * @description: 省市区数据
 */

@Repository
public interface AreaDao extends CommonRepository<Long, Area> {

    /**
     * 根据父级id查询数据
     * @param parentId
     * @return
     */
    List<Area> findByParentId(Long parentId);

    /**
     * 查询地址名称
     * @param parentId
     * @param cityName
     * @return
     */
    Area findByParentIdAndCityName(Long parentId, String cityName);
}