template.mapper.xml.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of primo-generator-mybatis-plus-maven-plugin Show documentation
Show all versions of primo-generator-mybatis-plus-maven-plugin Show documentation
自动生成增删改查代码插件,通过Maven插件配置,一键生成单表的所有CRUD操作
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="${package.Mapper}.${table.mapperName}"> #if(${enableCache}) <!--开启二级缓存--> <cache/> #end <resultMap id="BaseResultMap" type="${package.Entity}.${entity}"> #foreach($field in ${table.fields}) #if(${field.keyFlag}) <id column="${field.name}" property="${field.propertyName}" /> #else <result column="${field.name}" property="${field.propertyName}" /> #end #end </resultMap> <!-- 通用查询结果列--> <sql id="Base_Column_List"> ${table.fieldNames} </sql> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy