Skip to content

Commit b47140b

Browse files
committed
匹配条件范围 key{}:"表达式" 不允许连续减号 --;升级项目版本号
1 parent 3dc9dd1 commit b47140b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

APIJSONORM/pom.xml

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

66
<groupId>apijson.orm</groupId>
77
<artifactId>apijson-orm</artifactId>
8-
<version>4.3.0</version>
8+
<version>4.4.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONORM</name>

APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,9 +2062,9 @@ else if (range instanceof String) {//非Number类型需要客户端拼接成 < '
20622062
else if ("!=null".equals(c)) {
20632063
c = SQL.isNull(false);
20642064
}
2065-
else if (isPrepared() && PATTERN_RANGE.matcher(c).matches() == false) {
2065+
else if (isPrepared() && (c.contains("--") || PATTERN_RANGE.matcher(c).matches() == false)) {
20662066
throw new UnsupportedOperationException(key + "{}:value 的 value 中 " + c + " 不合法!"
2067-
+ "预编译模式下 key{}:\"condition\" 中 condition 必须 为 =null 或 !=null 或 符合正则表达式 ^[0-9%!=<>,]+$ !不允许空格!");
2067+
+ "预编译模式下 key{}:\"condition\" 中 condition 必须 为 =null 或 !=null 或 符合正则表达式 ^[0-9%!=<>,]+$ !不允许连续减号 -- !不允许空格!");
20682068
}
20692069

20702070
index = c == null ? -1 : c.indexOf("(");

0 commit comments

Comments
 (0)