This commit is contained in:
2025-10-15 12:35:14 +08:00
parent d6f224deb5
commit fd2f9e3ef3
3 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
##导入宏定义
$!{define.vm}
##设置表后缀(宏定义)
#setTableSuffix("Mapper")
##保存文件(宏定义)
#save("/mapper", "Mapper.xml")
##定义实体对象名
#set($entityName = $!tool.firstLowerCase($!tableInfo.name))
<?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="$!{tableInfo.savePackageName}.mapper.$!{tableInfo.name}Mapper">
<!-- 通用查询映射结果 -->
<resultMap id="$!{entityName}ResultMap" type="$!{tableInfo.savePackageName}.entity.$!tableInfo.name">
</resultMap>
<select id="selectPage" resultMap="$!{entityName}ResultMap">
select * from $!tableInfo.obj.name where is_deleted = 0
</select>
</mapper>