Skip to content

Commit

Permalink
匹配条件范围 key{}:"表达式" 不允许连续减号 --;升级项目版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon committed Dec 13, 2020
1 parent 3dc9dd1 commit b47140b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion APIJSONORM/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>apijson.orm</groupId>
<artifactId>apijson-orm</artifactId>
<version>4.3.0</version>
<version>4.4.0</version>
<packaging>jar</packaging>

<name>APIJSONORM</name>
Expand Down
4 changes: 2 additions & 2 deletions APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2062,9 +2062,9 @@ else if (range instanceof String) {//非Number类型需要客户端拼接成 < '
else if ("!=null".equals(c)) {
c = SQL.isNull(false);
}
else if (isPrepared() && PATTERN_RANGE.matcher(c).matches() == false) {
else if (isPrepared() && (c.contains("--") || PATTERN_RANGE.matcher(c).matches() == false)) {
throw new UnsupportedOperationException(key + "{}:value 的 value 中 " + c + " 不合法!"
+ "预编译模式下 key{}:\"condition\" 中 condition 必须 为 =null 或 !=null 或 符合正则表达式 ^[0-9%!=<>,]+$ !不允许空格!");
+ "预编译模式下 key{}:\"condition\" 中 condition 必须 为 =null 或 !=null 或 符合正则表达式 ^[0-9%!=<>,]+$ !不允许连续减号 -- !不允许空格!");
}

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

0 comments on commit b47140b

Please sign in to comment.