init2
This commit is contained in:
22
doc/easycode/mapper.xml.vm
Normal file
22
doc/easycode/mapper.xml.vm
Normal 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>
|
||||
Reference in New Issue
Block a user