Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
6ec3c976
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,发现更多精彩内容 >>
提交
6ec3c976
编写于
10月 22, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
自建表编译优化,支持集群同时编译
上级
dd38f3d1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
78 addition
and
8 deletion
+78
-8
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/input/ActionCover.java
...om/x/query/assemble/designer/jaxrs/input/ActionCover.java
+0
-2
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/input/ActionCreate.java
...m/x/query/assemble/designer/jaxrs/input/ActionCreate.java
+0
-2
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/ActionBuild.java
...om/x/query/assemble/designer/jaxrs/table/ActionBuild.java
+38
-0
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/ActionBuildAll.java
...x/query/assemble/designer/jaxrs/table/ActionBuildAll.java
+21
-2
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/TableAction.java
...om/x/query/assemble/designer/jaxrs/table/TableAction.java
+19
-2
未找到文件。
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/input/ActionCover.java
浏览文件 @
6ec3c976
...
...
@@ -165,8 +165,6 @@ class ActionCover extends BaseAction {
if
(!
wi
.
getTableList
().
isEmpty
()){
CacheManager
.
notify
(
Table
.
class
);
CacheManager
.
notify
(
Statement
.
class
);
business
.
buildAllTable
();
}
else
if
(!
wi
.
getStatementList
().
isEmpty
()){
CacheManager
.
notify
(
Statement
.
class
);
}
...
...
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/input/ActionCreate.java
浏览文件 @
6ec3c976
...
...
@@ -112,8 +112,6 @@ class ActionCreate extends BaseAction {
if
(!
wi
.
getTableList
().
isEmpty
()){
CacheManager
.
notify
(
Table
.
class
);
CacheManager
.
notify
(
Statement
.
class
);
business
.
buildAllTable
();
}
else
if
(!
wi
.
getStatementList
().
isEmpty
()){
CacheManager
.
notify
(
Statement
.
class
);
}
...
...
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/ActionBuild.java
0 → 100644
浏览文件 @
6ec3c976
package
com.x.query.assemble.designer.jaxrs.table
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.query.assemble.designer.Business
;
class
ActionBuild
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionBuild
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Wo
wo
=
new
Wo
();
Business
business
=
new
Business
(
emc
);
if
(!
business
.
controllable
(
effectivePerson
))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
wo
.
setValue
(
business
.
buildAllTable
());
logger
.
print
(
"build table complete!"
);
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
WrapBoolean
{
}
}
\ No newline at end of file
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/ActionBuildAll.java
浏览文件 @
6ec3c976
...
...
@@ -2,13 +2,21 @@ package com.x.query.assemble.designer.jaxrs.table;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.Application
;
import
com.x.base.core.project.connection.CipherConnectionAction
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.x_query_assemble_designer
;
import
com.x.query.assemble.designer.Business
;
import
com.x.query.assemble.designer.ThisApplication
;
import
java.util.Date
;
import
java.util.List
;
class
ActionBuildAll
extends
BaseAction
{
...
...
@@ -22,8 +30,19 @@ class ActionBuildAll extends BaseAction {
if
(!
business
.
controllable
(
effectivePerson
))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
wo
.
setValue
(
business
.
buildAllTable
());
List
<
Application
>
apps
=
ThisApplication
.
context
().
applications
().
get
(
x_query_assemble_designer
.
class
);
if
(
ListTools
.
isNotEmpty
(
apps
))
{
apps
.
stream
().
forEach
(
o
->
{
String
url
=
o
.
getUrlJaxrsRoot
()
+
"table/build?tt="
+
new
Date
().
getTime
();
logger
.
print
(
"{} do dispatch build table request to : {}"
,
effectivePerson
.
getDistinguishedName
(),
url
);
try
{
CipherConnectionAction
.
get
(
effectivePerson
.
getDebugger
(),
url
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
});
}
wo
.
setValue
(
true
);
result
.
setData
(
wo
);
...
...
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/TableAction.java
浏览文件 @
6ec3c976
...
...
@@ -53,12 +53,12 @@ public class TableAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"编译表对象生成实体类进行数据库建表,执行后需要重新启动."
,
action
=
ActionBuildAll
.
class
)
@JaxrsMethodDescribe
(
value
=
"编译表对象生成实体类进行数据库建表,执行后需要重新启动
,支持集群环境
."
,
action
=
ActionBuildAll
.
class
)
@GET
@Path
(
"build/all"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
buildAll
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
public
synchronized
void
buildAll
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
ActionResult
<
ActionBuildAll
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
...
...
@@ -70,6 +70,23 @@ public class TableAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"编译表对象生成实体类进行数据库建表,执行后需要重新启动,仅对当前服务器."
,
action
=
ActionBuild
.
class
)
@GET
@Path
(
"build"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
build
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
ActionResult
<
ActionBuild
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionBuild
().
execute
(
effectivePerson
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"根据标识获取表."
,
action
=
ActionGet
.
class
)
@GET
@Path
(
"{flag}"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录