|
|
@ -46,16 +46,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
<update id="update${className}" parameterType="${className}">
|
|
|
|
<update id="update${className}" parameterType="${className}">
|
|
|
|
update ${tableName}
|
|
|
|
update ${tableName}
|
|
|
|
<set>
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#foreach($column in $columns)
|
|
|
|
#if($column.columnName != $primaryKey.columnName)
|
|
|
|
#if($column.columnName != $primaryKey.columnName)
|
|
|
|
<if test="$column.attrname != null and $column.attrname != ''">$column.columnName = #{$column.attrname}#if($velocityCount != $columns.size()), #end</if>
|
|
|
|
<if test="$column.attrname != null #if($column.attrType == 'String' ) and $column.attrname != '' #end ">
|
|
|
|
#end
|
|
|
|
$column.columnName = #{$column.attrname},
|
|
|
|
#end
|
|
|
|
</if>
|
|
|
|
</set>
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
where ${primaryKey.columnName} = #{${primaryKey.attrname}}
|
|
|
|
where ${primaryKey.columnName} = #{${primaryKey.attrname}}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="delete${className}ById" parameterType="${primaryKey.attrType}">
|
|
|
|
<delete id="delete${className}ById" parameterType="${primaryKey.attrType}">
|
|
|
|
delete from ${tableName} where ${primaryKey.columnName} = #{${primaryKey.attrname}}
|
|
|
|
delete from ${tableName} where ${primaryKey.columnName} = #{${primaryKey.attrname}}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|