Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
8a0f6fbe
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,发现更多精彩内容 >>
提交
8a0f6fbe
编写于
9月 11, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
distinct问题修复
上级
1a266890
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
19 addition
and
16 deletion
+19
-16
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/factory/TemplatePageFactory.java
...portal/assemble/designer/factory/TemplatePageFactory.java
+5
-4
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/jaxrs/input/BaseAction.java
...om/x/portal/assemble/designer/jaxrs/input/BaseAction.java
+2
-2
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/jaxrs/portal/ActionListSummaryWithPortalCategory.java
...ner/jaxrs/portal/ActionListSummaryWithPortalCategory.java
+2
-2
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/jaxrs/portal/BaseAction.java
...m/x/portal/assemble/designer/jaxrs/portal/BaseAction.java
+5
-4
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/factory/PortalFactory.java
.../com/x/portal/assemble/surface/factory/PortalFactory.java
+3
-2
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/jaxrs/portal/ActionList.java
...om/x/portal/assemble/surface/jaxrs/portal/ActionList.java
+2
-2
未找到文件。
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/factory/TemplatePageFactory.java
浏览文件 @
8a0f6fbe
package
com.x.portal.assemble.designer.factory
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -82,8 +83,8 @@ public class TemplatePageFactory extends AbstractFactory {
p
=
cb
.
isMember
(
effectivePerson
.
getDistinguishedName
(),
root
.
get
(
TemplatePage_
.
controllerList
));
p
=
cb
.
or
(
p
,
cb
.
equal
(
root
.
get
(
TemplatePage_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
}
cq
.
select
(
root
.
get
(
TemplatePage_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
TemplatePage_
.
id
)).
where
(
p
)).
getResultList
(
);
cq
.
select
(
root
.
get
(
TemplatePage_
.
id
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
()
);
return
list
;
}
...
...
@@ -98,8 +99,8 @@ public class TemplatePageFactory extends AbstractFactory {
cb
.
or
(
cb
.
isMember
(
effectivePerson
.
getDistinguishedName
(),
root
.
get
(
TemplatePage_
.
controllerList
)),
cb
.
equal
(
root
.
get
(
TemplatePage_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
())));
}
cq
.
select
(
root
.
get
(
TemplatePage_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
TemplatePage_
.
id
)).
where
(
p
)).
getResultList
(
);
cq
.
select
(
root
.
get
(
TemplatePage_
.
id
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
()
);
return
list
;
}
...
...
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/jaxrs/input/BaseAction.java
浏览文件 @
8a0f6fbe
...
...
@@ -53,7 +53,7 @@ abstract class BaseAction extends StandardJaxrsAction {
CriteriaQuery
<
Portal
>
cq
=
cb
.
createQuery
(
Portal
.
class
);
Root
<
Portal
>
root
=
cq
.
from
(
Portal
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Portal_
.
alias
),
alias
);
List
<
Portal
>
os
=
em
.
createQuery
(
cq
.
select
(
root
).
where
(
p
)
.
distinct
(
true
)
).
getResultList
();
List
<
Portal
>
os
=
em
.
createQuery
(
cq
.
select
(
root
).
where
(
p
)).
getResultList
();
if
(
os
.
size
()
==
1
)
{
return
os
.
get
(
0
);
}
else
{
...
...
@@ -70,7 +70,7 @@ abstract class BaseAction extends StandardJaxrsAction {
CriteriaQuery
<
Portal
>
cq
=
cb
.
createQuery
(
Portal
.
class
);
Root
<
Portal
>
root
=
cq
.
from
(
Portal
.
class
);
Predicate
p
=
cb
.
equal
(
root
.
get
(
Portal_
.
name
),
name
);
List
<
Portal
>
os
=
em
.
createQuery
(
cq
.
select
(
root
).
where
(
p
)
.
distinct
(
true
)
).
getResultList
();
List
<
Portal
>
os
=
em
.
createQuery
(
cq
.
select
(
root
).
where
(
p
)).
getResultList
();
if
(
os
.
size
()
==
1
)
{
return
os
.
get
(
0
);
}
else
{
...
...
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/jaxrs/portal/ActionListSummaryWithPortalCategory.java
浏览文件 @
8a0f6fbe
...
...
@@ -56,8 +56,8 @@ class ActionListSummaryWithPortalCategory extends BaseAction {
p
=
cb
.
or
(
p
,
cb
.
equal
(
root
.
get
(
Portal_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
}
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Portal_
.
portalCategory
),
Objects
.
toString
(
portalCategory
,
""
)));
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)).
getResultList
(
);
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
()
);
return
list
;
}
...
...
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/jaxrs/portal/BaseAction.java
浏览文件 @
8a0f6fbe
...
...
@@ -2,6 +2,7 @@ package com.x.portal.assemble.designer.jaxrs.portal;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
...
...
@@ -60,8 +61,8 @@ abstract class BaseAction extends StandardJaxrsAction {
p
=
cb
.
isMember
(
effectivePerson
.
getDistinguishedName
(),
root
.
get
(
Portal_
.
controllerList
));
p
=
cb
.
or
(
p
,
cb
.
equal
(
root
.
get
(
Portal_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
}
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)).
getResultList
(
);
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
()
);
return
list
;
}
...
...
@@ -77,8 +78,8 @@ abstract class BaseAction extends StandardJaxrsAction {
p
=
cb
.
or
(
p
,
cb
.
equal
(
root
.
get
(
Portal_
.
creatorPerson
),
effectivePerson
.
getDistinguishedName
()));
}
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Portal_
.
portalCategory
),
Objects
.
toString
(
portalCategory
,
""
)));
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
List
<
String
>
list
=
em
.
createQuery
(
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)).
getResultList
(
);
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
);
List
<
String
>
list
=
em
.
createQuery
(
cq
).
getResultList
().
stream
().
distinct
().
collect
(
Collectors
.
toList
()
);
return
list
;
}
...
...
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/factory/PortalFactory.java
浏览文件 @
8a0f6fbe
...
...
@@ -19,6 +19,7 @@ import com.x.base.core.project.cache.Cache.CacheCategory;
import
com.x.base.core.project.cache.Cache.CacheKey
;
import
com.x.base.core.project.cache.CacheManager
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
public
class
PortalFactory
extends
AbstractFactory
{
...
...
@@ -47,8 +48,8 @@ public class PortalFactory extends AbstractFactory {
p
=
cb
.
or
(
p
,
root
.
get
(
Portal_
.
availableIdentityList
).
in
(
identities
));
p
=
cb
.
or
(
p
,
root
.
get
(
Portal_
.
availableUnitList
).
in
(
units
));
}
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
public
boolean
visible
(
EffectivePerson
effectivePerson
,
Portal
portal
)
throws
Exception
{
...
...
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/jaxrs/portal/ActionList.java
浏览文件 @
8a0f6fbe
...
...
@@ -70,8 +70,8 @@ class ActionList extends BaseAction {
who
=
cb
.
or
(
who
,
root
.
get
(
Portal_
.
availableUnitList
).
in
(
units
));
p
=
cb
.
and
(
p
,
who
);
}
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
)
.
distinct
(
true
)
;
return
em
.
createQuery
(
cq
).
getResultList
();
cq
.
select
(
root
.
get
(
Portal_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
public
static
class
Wo
extends
Portal
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录