Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
ecd22a1f
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ecd22a1f
编写于
11月 04, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加视图数组类型查询条件:in
上级
66646e45
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
26 addition
and
2 deletion
+26
-2
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/Comparison.java
...c/main/java/com/x/query/core/express/plan/Comparison.java
+13
-0
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/FilterEntry.java
.../main/java/com/x/query/core/express/plan/FilterEntry.java
+13
-2
未找到文件。
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/Comparison.java
浏览文件 @
ecd22a1f
...
@@ -12,6 +12,7 @@ public abstract class Comparison {
...
@@ -12,6 +12,7 @@ public abstract class Comparison {
private
static
String
[]
like
=
new
String
[]
{
"like"
};
private
static
String
[]
like
=
new
String
[]
{
"like"
};
private
static
String
[]
notLike
=
new
String
[]
{
"notLike"
,
"not like"
};
private
static
String
[]
notLike
=
new
String
[]
{
"notLike"
,
"not like"
};
private
static
String
[]
between
=
new
String
[]
{
"range"
,
"between"
};
private
static
String
[]
between
=
new
String
[]
{
"range"
,
"between"
};
private
static
String
[]
isMember
=
new
String
[]
{
"isMember"
,
"in"
};
public
static
boolean
isEquals
(
String
comparison
)
throws
Exception
{
public
static
boolean
isEquals
(
String
comparison
)
throws
Exception
{
for
(
String
str
:
equals
)
{
for
(
String
str
:
equals
)
{
...
@@ -94,6 +95,15 @@ public abstract class Comparison {
...
@@ -94,6 +95,15 @@ public abstract class Comparison {
return
false
;
return
false
;
}
}
public
static
boolean
isIsMember
(
String
comparison
)
throws
Exception
{
for
(
String
str
:
isMember
)
{
if
(
StringUtils
.
equalsIgnoreCase
(
str
,
StringUtils
.
trim
(
comparison
)))
{
return
true
;
}
}
return
false
;
}
public
static
String
getMatchCom
(
String
comparison
)
throws
Exception
{
public
static
String
getMatchCom
(
String
comparison
)
throws
Exception
{
if
(
isNotEquals
(
comparison
)){
if
(
isNotEquals
(
comparison
)){
return
notEquals
[
notEquals
.
length
-
1
];
return
notEquals
[
notEquals
.
length
-
1
];
...
@@ -116,6 +126,9 @@ public abstract class Comparison {
...
@@ -116,6 +126,9 @@ public abstract class Comparison {
}
else
if
(
isNotLike
(
comparison
)){
}
else
if
(
isNotLike
(
comparison
)){
return
notLike
[
notLike
.
length
-
1
];
return
notLike
[
notLike
.
length
-
1
];
}
else
if
(
isIsMember
(
comparison
)){
return
isMember
[
isMember
.
length
-
1
];
}
else
{
}
else
{
return
equals
[
equals
.
length
-
1
];
return
equals
[
equals
.
length
-
1
];
}
}
...
...
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/FilterEntry.java
浏览文件 @
ecd22a1f
package
com.x.query.core.express.plan
;
package
com.x.query.core.express.plan
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.Objects
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Predicate
;
...
@@ -559,6 +558,12 @@ public class FilterEntry extends GsonPropertyObject {
...
@@ -559,6 +558,12 @@ public class FilterEntry extends GsonPropertyObject {
p
=
cb
.
and
(
p
,
cb
.
notLike
(
root
.
get
(
Item_
.
stringShortValue
),
"%"
+
compareValue
+
"%"
));
p
=
cb
.
and
(
p
,
cb
.
notLike
(
root
.
get
(
Item_
.
stringShortValue
),
"%"
+
compareValue
+
"%"
));
}
else
if
(
Comparison
.
isBetween
(
this
.
comparison
))
{
}
else
if
(
Comparison
.
isBetween
(
this
.
comparison
))
{
p
=
cb
.
and
(
p
,
cb
.
between
(
root
.
get
(
Item_
.
stringShortValue
),
compareValue
,
compareOtherValue
));
p
=
cb
.
and
(
p
,
cb
.
between
(
root
.
get
(
Item_
.
stringShortValue
),
compareValue
,
compareOtherValue
));
}
else
if
(
Comparison
.
isIsMember
(
this
.
comparison
))
{
if
(
compareValue
.
indexOf
(
","
)
>
-
1
){
p
=
cb
.
and
(
p
,
root
.
get
(
Item_
.
stringShortValue
).
in
(
Arrays
.
asList
(
compareValue
.
split
(
","
))));
}
else
{
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Item_
.
stringShortValue
),
compareValue
));
}
}
else
{
}
else
{
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Item_
.
stringShortValue
),
compareValue
));
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Item_
.
stringShortValue
),
compareValue
));
}
}
...
@@ -974,6 +979,12 @@ public class FilterEntry extends GsonPropertyObject {
...
@@ -974,6 +979,12 @@ public class FilterEntry extends GsonPropertyObject {
p
=
cb
.
and
(
p
,
cb
.
notLike
(
root
.
get
(
paramName
),
"%"
+
compareValue
+
"%"
));
p
=
cb
.
and
(
p
,
cb
.
notLike
(
root
.
get
(
paramName
),
"%"
+
compareValue
+
"%"
));
}
else
if
(
Comparison
.
isBetween
(
this
.
comparison
))
{
}
else
if
(
Comparison
.
isBetween
(
this
.
comparison
))
{
p
=
cb
.
and
(
p
,
cb
.
between
(
root
.
get
(
paramName
),
compareValue
,
compareOtherValue
));
p
=
cb
.
and
(
p
,
cb
.
between
(
root
.
get
(
paramName
),
compareValue
,
compareOtherValue
));
}
else
if
(
Comparison
.
isIsMember
(
this
.
comparison
))
{
if
(
compareValue
.
indexOf
(
","
)
>
-
1
){
p
=
cb
.
and
(
p
,
root
.
get
(
paramName
).
in
(
Arrays
.
asList
(
compareValue
.
split
(
","
))));
}
else
{
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
paramName
),
compareValue
));
}
}
else
{
}
else
{
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
paramName
),
compareValue
));
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
paramName
),
compareValue
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录