
templates.dao.impl.ftl Maven / Gradle / Ivy
package ${entityInfo.daoImplPackage};
<#list imports as pkg>
import ${pkg};
#list>
/**
*
* ${entityInfo.tableInfo.remarks!} Dao 实现类
*
*
* @author ${author!}
* @since ${date}
*/
@${repositoryAnnotationName}
public class ${entityInfo.daoImplName} ${superExtend}<#if daoConfig.isGeneric()><${entityInfo.name},<#if entityInfo.idFieldInfo??>${entityInfo.idFieldInfo.typeName}<#else>Void#if>>#if> implements ${entityInfo.daoName}{
<#if containerType.is("solon")>
@${autowiredAnnotationName}
private ${entityInfo.mapperName} ${util.firstToLower(entityInfo.mapperName)};
@Init
public void init(){
this.setMapper(${util.firstToLower(entityInfo.mapperName)});
}
<#else>
@${autowiredAnnotationName}
public ${entityInfo.daoImplName} (${entityInfo.mapperName} ${util.firstToLower(entityInfo.mapperName)}){
super(${util.firstToLower(entityInfo.mapperName)});
}
#if>
private ${entityInfo.mapperName} getMapper(){
return (${entityInfo.mapperName}) this.mapper;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy