|
|
@ -79,13 +79,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
|
|
|
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
#if($table.sub)
|
|
|
|
<select id="select${subClassName}List" resultType="${subClassName}" resultMap="${subClassName}Result">
|
|
|
|
<select id="select${subClassName}List" resultType="${subClassName}" resultMap="${subClassName}Result">
|
|
|
|
select#foreach ($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end
|
|
|
|
select#foreach ($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end
|
|
|
|
from ${subTableName}
|
|
|
|
from ${subTableName}
|
|
|
|
where ${subTableFkName} = #{${subTableFkName}}
|
|
|
|
where ${subTableFkName} = #{${subTableFkName}}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
#end
|
|
|
|
<insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
|
|
|
<insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
|
|
|
insert into ${tableName}
|
|
|
|
insert into ${tableName}
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batch${subClassName}">
|
|
|
|
<insert id="batch${subClassName}">
|
|
|
|
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values
|
|
|
|
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values
|
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
|
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end)
|
|
|
|
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end)
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|