package ${packageName}.service;
<#if table.cacheServiceType==0 >
    <#assign Service = "ICRUDService">
<#elseif table.cacheServiceType==1 >
    <#assign Service = "ICRUDCacheService">
<#elseif table.cacheServiceType==2 >
    <#assign Service = "ICRUDCacheService">
<#else >
    <#assign Service = "ICRUDService">
</#if>
import com.mortals.framework.service.${Service};
import ${packageName}.model.${ClassName}Entity;
import ${packageName}.model.${ClassName}TreeSelect;
import java.util.List;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
/**
* ${ClassName}Service
*
* ${functionName} service接口
*
* @author ${author}
* @date ${datetime}
*/
public interface ${ClassName}Service extends ${Service}<${ClassName}Entity,${pkColumn.javaType}>{

    /**
    * 是否存在${functionName}节点
    *
    * @param ${ClassName?uncap_first}Id ${functionName}ID
    * @return 结果
    */
    boolean hasChildBy${ClassName}Id(Long ${ClassName?uncap_first}Id);


    /**
    * 查询${functionName}数据
    *
    * @param ${ClassName?uncap_first} ${functionName}
    * @return ${functionName}集合
    */
    List<${ClassName}Entity> select${ClassName}List(${ClassName}Entity ${ClassName?uncap_first});


    /**
    * 构建前端所需要下拉树结构
    *
    * @param ${ClassName?uncap_first}List ${functionName}列表
    * @return 下拉树结构列表
    */
    List<${ClassName}TreeSelect> build${ClassName}TreeSelect(List<${ClassName}Entity> ${ClassName?uncap_first}List);

    /**
    * 根据父id查询子节点
    * @param parentId
    * @param context
    * @return
    */
    List<${ClassName}TreeSelect> getListByParentId(${treeParentCodeType} parentId,Context context);
}