Skip to content

Commit c47c87e

Browse files
committed
OGNL中的and,or必须小写!解决该错误!
1 parent 2031524 commit c47c87e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/tk/mybatis/mapper/mapperhelper/SqlHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static String getIfNotNull(String entityName, EntityColumn column, String
181181
}
182182
sql.append(column.getProperty()).append(" != null");
183183
if (empty && column.getJavaType().equals(String.class)) {
184-
sql.append(" AND ");
184+
sql.append(" and ");
185185
if (StringUtil.isNotEmpty(entityName)) {
186186
sql.append(entityName).append(".");
187187
}
@@ -210,7 +210,7 @@ public static String getIfIsNull(String entityName, EntityColumn column, String
210210
}
211211
sql.append(column.getProperty()).append(" == null");
212212
if (empty && column.getJavaType().equals(String.class)) {
213-
sql.append(" OR ");
213+
sql.append(" or ");
214214
if (StringUtil.isNotEmpty(entityName)) {
215215
sql.append(entityName).append(".");
216216
}

0 commit comments

Comments
 (0)