mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -512,7 +512,14 @@ public class Condition implements Cloneable, Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<String> strs = SplitUtil.split(valueStr, StrUtil.SPACE, 3, true, false);
|
// issue#I892T5 处理NOT IN
|
||||||
|
if(StrUtil.startWithIgnoreCase(valueStr, OPERATOR_NOT_IN)){
|
||||||
|
this.operator = OPERATOR_NOT_IN;
|
||||||
|
this.value = StrUtil.trim(StrUtil.subSuf(valueStr, OPERATOR_NOT_IN.length()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<String> strs = SplitUtil.split(valueStr, StrUtil.SPACE, 2, true, false);
|
||||||
if (strs.size() < 2) {
|
if (strs.size() < 2) {
|
||||||
// 无空格,按照普通值对待
|
// 无空格,按照普通值对待
|
||||||
return;
|
return;
|
||||||
@@ -521,13 +528,6 @@ public class Condition implements Cloneable, Serializable {
|
|||||||
// 处理常用符号和IN
|
// 处理常用符号和IN
|
||||||
final String firstPart = strs.get(0).toUpperCase();
|
final String firstPart = strs.get(0).toUpperCase();
|
||||||
|
|
||||||
// issue#I892T5 处理NOT IN
|
|
||||||
if("NOT".equals(firstPart) && OPERATOR_IN.equalsIgnoreCase(strs.get(1))){
|
|
||||||
this.operator = OPERATOR_NOT_IN;
|
|
||||||
this.value = strs.get(2);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (OPERATORS.contains(firstPart)) {
|
if (OPERATORS.contains(firstPart)) {
|
||||||
this.operator = firstPart;
|
this.operator = firstPart;
|
||||||
// 比较符号后跟大部分为数字,此处做转换(IN不做转换)
|
// 比较符号后跟大部分为数字,此处做转换(IN不做转换)
|
||||||
|
Reference in New Issue
Block a user