Skip to content

Commit b952f34

Browse files
committed
refactor(基础模块): 优化条件比对
1 parent 58e91a5 commit b952f34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jetlinks-components/common-component/src/main/java/org/jetlinks/community/reactorql/term/FixedTermTypeSupport.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,25 @@ public boolean matchBlocking(Object expect, Object actual) {
9090
gt("大于", "gt", DateTimeType.ID, ShortType.ID, IntType.ID, LongType.ID, FloatType.ID, DoubleType.ID) {
9191
@Override
9292
public boolean matchBlocking(Object expect, Object actual) {
93-
return CompareUtils.compare(expect, actual) > 0;
93+
return CompareUtils.compare(actual, expect) > 0;
9494
}
9595
},
9696
gte("大于等于", "gte", DateTimeType.ID, ShortType.ID, IntType.ID, LongType.ID, FloatType.ID, DoubleType.ID) {
9797
@Override
9898
public boolean matchBlocking(Object expect, Object actual) {
99-
return CompareUtils.compare(expect, actual) >= 0;
99+
return CompareUtils.compare(actual, expect) >= 0;
100100
}
101101
},
102102
lt("小于", "lt", DateTimeType.ID, ShortType.ID, IntType.ID, LongType.ID, FloatType.ID, DoubleType.ID) {
103103
@Override
104104
public boolean matchBlocking(Object expect, Object actual) {
105-
return CompareUtils.compare(expect, actual) < 0;
105+
return CompareUtils.compare(actual, expect) < 0;
106106
}
107107
},
108108
lte("小于等于", "lte", DateTimeType.ID, ShortType.ID, IntType.ID, LongType.ID, FloatType.ID, DoubleType.ID) {
109109
@Override
110110
public boolean matchBlocking(Object expect, Object actual) {
111-
return CompareUtils.compare(expect, actual) <= 0;
111+
return CompareUtils.compare(actual, expect) <= 0;
112112
}
113113
},
114114

0 commit comments

Comments
 (0)