mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
代码生成模板调整,字段为String并且必填则加空串条件
This commit is contained in:
parent
2fd3cbbd18
commit
945fb282dd
@ -56,14 +56,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
||||||
<if test="$column.javaField != null #if($column.javaType == 'String' ) and $column.javaField != ''#end">$column.columnName,</if>
|
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName,</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
||||||
<if test="$column.javaField != null #if($column.javaType == 'String' ) and $column.javaField != ''#end">#{$column.javaField},</if>
|
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">#{$column.javaField},</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</trim>
|
</trim>
|
||||||
@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $pkColumn.columnName)
|
#if($column.columnName != $pkColumn.columnName)
|
||||||
<if test="$column.javaField != null #if($column.javaType == 'String' ) and $column.javaField != ''#end">$column.columnName = #{$column.javaField},</if>
|
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName = #{$column.javaField},</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</trim>
|
</trim>
|
||||||
|
Loading…
Reference in New Issue
Block a user