Skip to content

Commit 0fd7795

Browse files
committed
Example查询中and缺少空格
1 parent 0c9b850 commit 0fd7795

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.github.abel533</groupId>
66
<artifactId>mapper</artifactId>
7-
<version>2.3.2</version>
7+
<version>2.3.3-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>mapper</name>

src/main/java/com/github/abel533/mapperhelper/MapperTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,15 @@ protected void newSelectKeyMappedStatement(MappedStatement ms, EntityHelper.Enti
457457

458458
public IfSqlNode ExampleValidSqlNode(Configuration configuration) {
459459
List<SqlNode> whenSqlNodes = new ArrayList<SqlNode>();
460-
IfSqlNode noValueSqlNode = new IfSqlNode(new TextSqlNode("and ${criterion.condition}"), "criterion.noValue");
460+
IfSqlNode noValueSqlNode = new IfSqlNode(new TextSqlNode(" and ${criterion.condition}"), "criterion.noValue");
461461
whenSqlNodes.add(noValueSqlNode);
462-
IfSqlNode singleValueSqlNode = new IfSqlNode(new TextSqlNode("and ${criterion.condition} #{criterion.value}"), "criterion.singleValue");
462+
IfSqlNode singleValueSqlNode = new IfSqlNode(new TextSqlNode(" and ${criterion.condition} #{criterion.value}"), "criterion.singleValue");
463463
whenSqlNodes.add(singleValueSqlNode);
464-
IfSqlNode betweenValueSqlNode = new IfSqlNode(new TextSqlNode("and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}"), "criterion.betweenValue");
464+
IfSqlNode betweenValueSqlNode = new IfSqlNode(new TextSqlNode(" and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}"), "criterion.betweenValue");
465465
whenSqlNodes.add(betweenValueSqlNode);
466466

467467
List<SqlNode> listValueContentSqlNodes = new ArrayList<SqlNode>();
468-
listValueContentSqlNodes.add(new TextSqlNode("and ${criterion.condition}"));
468+
listValueContentSqlNodes.add(new TextSqlNode(" and ${criterion.condition}"));
469469
ForEachSqlNode listValueForEachSqlNode = new ForEachSqlNode(configuration, new StaticTextSqlNode("#{listItem}"), "criterion.value", null, "listItem", "(", ")", ",");
470470
listValueContentSqlNodes.add(listValueForEachSqlNode);
471471
IfSqlNode listValueSqlNode = new IfSqlNode(new MixedSqlNode(listValueContentSqlNodes), "criterion.listValue");

0 commit comments

Comments
 (0)