Skip to content

Commit 3007dba

Browse files
committed
|2021.03.24|修复Mybatis.XML中缺失test=关键字问题。(感谢@BWHN/YUEHUI的反馈)。|
|2021.03.24|修复Mybatis.XML中缺失test=关键字问题。(感谢@BWHN/YUEHUI的反馈)。|
1 parent 832a7f9 commit 3007dba

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Thanks for `JetBrains` providing us the `Licenses for Open Source Development`
6060
# Update Logs
6161
|更新日期|更新内容|
6262
|:----|:----|
63+
|2021.03.24|修复Mybatis.XML中缺失test=关键字问题。(感谢@BWHN/YUEHUI的反馈)。|
6364
|2021.01.18|OEM信息优化,支持多配置文件模式,支持在application*.yml自定义信息,以及切换local/cdn模式。|
6465
|2021.01.17|生成后自动trim掉前后空格输出。<br>完善ReadMe文档。<br>优化云CDN引入部分。<br>优化returnUtil部分。<br>表明前缀选项(感谢@wwlg的建议)。 <br>是否带字段注释设置(感谢@fengpojian的建议)。<br>优化Mybatis的''!=判断(感谢@zhongsb的建议)。<br>Mybatis-Plus增加Service层(感谢@yf466532479的建议)。 |
6566
|2021.01.16|全新3.0版本:<br>一、前端半vue半js化,更多动态加载项。<br>二、支持更多生成设置,优化生成场景。<br>三、js导入支持本地/CDN模式,支持断网环境轻松使用。|

generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
2626
<#list classInfo.fieldList as fieldItem >
2727
<#if fieldItem.columnName != "id" >
28-
<if "null != ${fieldItem.fieldName} and '' != ${fieldItem.fieldName}">
28+
<if test="null != ${fieldItem.fieldName} and '' != ${fieldItem.fieldName}">
2929
${fieldItem.columnName}<#if fieldItem_has_next>,</#if>
3030
${r"</if>"}
3131
</#if>
@@ -41,7 +41,7 @@
4141
NOW()<#if fieldItem_has_next>,</#if>
4242
${r"</if>"}
4343
<#else>-->
44-
<if "null != ${fieldItem.fieldName} and '' != ${fieldItem.fieldName}">
44+
<if test="null != ${fieldItem.fieldName} and '' != ${fieldItem.fieldName}">
4545
${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>,</#if>
4646
${r"</if>"}
4747
<#--</#if>-->
@@ -61,7 +61,7 @@
6161
<set>
6262
<#list classInfo.fieldList as fieldItem >
6363
<#if fieldItem.columnName != "id" && fieldItem.columnName != "AddTime" && fieldItem.columnName != "UpdateTime" >
64-
<if "null != ${fieldItem.fieldName} and '' != ${fieldItem.fieldName}">${fieldItem.columnName} = ${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>,</#if>${r"</if>"}
64+
<if test="null != ${fieldItem.fieldName} and '' != ${fieldItem.fieldName}">${fieldItem.columnName} = ${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>,</#if>${r"</if>"}
6565
</#if>
6666
</#list>
6767
</set>

0 commit comments

Comments
 (0)