package com.mortals.xhx.module.area.service;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaTreeSelect;
import java.util.List;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
/**
* AreaService
*
* 区域 service接口
*
* @author zxfei
* @date 2022-01-12
*/
public interface AreaService extends ICRUDCacheService<AreaEntity,Long> {

    /**
    * 是否存在区域节点
    *
    * @param areaId 区域ID
    * @return 结果
    */
    boolean hasChildByAreaId(String areaId);


    /**
    * 查询区域数据
    *
    * @param area 区域
    * @return 区域集合
    */
    List<AreaEntity> selectAreaList(AreaEntity area);


    /**
    * 构建前端所需要下拉树结构
    *
    * @param areaList 区域列表
    * @return 下拉树结构列表
    */
    List<AreaTreeSelect> buildAreaTreeSelect(List<AreaEntity> areaList);



    List<AreaTreeSelect> getListByParentId(String parentId,Context context);
}