templates.mapper.ftl Maven / Gradle / Ivy
The newest version!
package ${entityInfo.mapperPackage};
<#list imports as pkg>
import ${pkg};
#list>
/**
*
* ${entityInfo.tableInfo.remarks!} Mapper 接口
*
*
* @author ${author!}
* @since ${date}
*/
<#if mapperConfig.isMapperAnnotation()>
@Mapper
#if>
public interface ${entityInfo.buildMapperClassFullName(mapperConfig)} {
<#if entityInfo.hasMultiId()>
default ${entityInfo.name} getById(<#list entityInfo.idFieldInfoList as field>${field.typeName} ${field.name}<#if field_has_next>, #if>#list>){
return this.get(where -> where<#list entityInfo.idFieldInfoList as field>.eq(${entityInfo.name}::${field.getterMethodName()}, ${field.name})#list>);
}
default int deleteById(<#list entityInfo.idFieldInfoList as field>${field.typeName} ${field.name}<#if field_has_next>, #if>#list>){
return this.delete(where -> where<#list entityInfo.idFieldInfoList as field>.eq(${entityInfo.name}::${field.getterMethodName()}, ${field.name})#list>);
}
#if>
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy