Files
zhiyoupiao_admin/doc/easycode/mapper.xml.vm
2025-10-15 12:35:14 +08:00

23 lines
884 B
Plaintext

##导入宏定义
$!{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>