Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
b8ff3dc8
o2oa
项目概览
fuyue82
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
b8ff3dc8
编写于
2月 28, 2022
作者:
O
o2null
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feat/gc' into 'develop'
Feat/gc See merge request o2oa/o2oa!311
上级
15e462f3
5dbf60ca
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
34 addition
and
149 deletion
+34
-149
o2server/x_console/src/main/java/com/x/server/console/action/ActionControl.java
.../main/java/com/x/server/console/action/ActionControl.java
+14
-4
o2server/x_console/src/main/java/com/x/server/console/action/GarbageCollection.java
...n/java/com/x/server/console/action/GarbageCollection.java
+15
-0
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/statement/ActionExecuteV2.java
...ry/assemble/designer/jaxrs/statement/ActionExecuteV2.java
+2
-0
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/statement/ActionExecuteV2.java
...ery/assemble/surface/jaxrs/statement/ActionExecuteV2.java
+3
-3
o2server/x_query_assemble_surface/src/test/resources/test.json
...ver/x_query_assemble_surface/src/test/resources/test.json
+0
-142
未找到文件。
o2server/x_console/src/main/java/com/x/server/console/action/ActionControl.java
浏览文件 @
b8ff3dc8
...
@@ -42,6 +42,7 @@ public class ActionControl extends ActionBase {
...
@@ -42,6 +42,7 @@ public class ActionControl extends ActionBase {
private
static
final
String
CMD_SC
=
"sc"
;
private
static
final
String
CMD_SC
=
"sc"
;
private
static
final
String
CMD_EN
=
"en"
;
private
static
final
String
CMD_EN
=
"en"
;
private
static
final
String
CMD_DE
=
"de"
;
private
static
final
String
CMD_DE
=
"de"
;
private
static
final
String
CMD_GC
=
"gc"
;
private
static
final
int
REPEAT_MAX
=
100
;
private
static
final
int
REPEAT_MAX
=
100
;
private
static
final
int
REPEAT_MIN
=
1
;
private
static
final
int
REPEAT_MIN
=
1
;
...
@@ -64,12 +65,8 @@ public class ActionControl extends ActionBase {
...
@@ -64,12 +65,8 @@ public class ActionControl extends ActionBase {
ec
(
cmd
);
ec
(
cmd
);
}
else
if
(
cmd
.
hasOption
(
CMD_DD
))
{
}
else
if
(
cmd
.
hasOption
(
CMD_DD
))
{
dd
(
cmd
);
dd
(
cmd
);
// } else if (cmd.hasOption(CMD_DS)) {
// ds(cmd);
}
else
if
(
cmd
.
hasOption
(
CMD_RD
))
{
}
else
if
(
cmd
.
hasOption
(
CMD_RD
))
{
rd
(
cmd
);
rd
(
cmd
);
// } else if (cmd.hasOption(CMD_RS)) {
// rs(cmd);
}
else
if
(
cmd
.
hasOption
(
CMD_CLH2
))
{
}
else
if
(
cmd
.
hasOption
(
CMD_CLH2
))
{
clh2
(
cmd
);
clh2
(
cmd
);
}
else
if
(
cmd
.
hasOption
(
CMD_UF
))
{
}
else
if
(
cmd
.
hasOption
(
CMD_UF
))
{
...
@@ -84,6 +81,8 @@ public class ActionControl extends ActionBase {
...
@@ -84,6 +81,8 @@ public class ActionControl extends ActionBase {
en
(
cmd
);
en
(
cmd
);
}
else
if
(
cmd
.
hasOption
(
CMD_DE
))
{
}
else
if
(
cmd
.
hasOption
(
CMD_DE
))
{
de
(
cmd
);
de
(
cmd
);
}
else
if
(
cmd
.
hasOption
(
CMD_GC
))
{
gc
();
}
else
{
}
else
{
HelpFormatter
formatter
=
new
HelpFormatter
();
HelpFormatter
formatter
=
new
HelpFormatter
();
formatter
.
printHelp
(
"control command"
,
displayOptions
());
formatter
.
printHelp
(
"control command"
,
displayOptions
());
...
@@ -110,6 +109,7 @@ public class ActionControl extends ActionBase {
...
@@ -110,6 +109,7 @@ public class ActionControl extends ActionBase {
options
.
addOption
(
scOption
());
options
.
addOption
(
scOption
());
options
.
addOption
(
enOption
());
options
.
addOption
(
enOption
());
options
.
addOption
(
deOption
());
options
.
addOption
(
deOption
());
options
.
addOption
(
gcOption
());
return
options
;
return
options
;
}
}
...
@@ -129,6 +129,7 @@ public class ActionControl extends ActionBase {
...
@@ -129,6 +129,7 @@ public class ActionControl extends ActionBase {
displayOptions
.
addOption
(
rstOption
());
displayOptions
.
addOption
(
rstOption
());
displayOptions
.
addOption
(
scOption
());
displayOptions
.
addOption
(
scOption
());
displayOptions
.
addOption
(
enOption
());
displayOptions
.
addOption
(
enOption
());
displayOptions
.
addOption
(
gcOption
());
return
displayOptions
;
return
displayOptions
;
}
}
...
@@ -202,6 +203,10 @@ public class ActionControl extends ActionBase {
...
@@ -202,6 +203,10 @@ public class ActionControl extends ActionBase {
.
desc
(
"密码文本解密."
).
hasArg
().
build
();
.
desc
(
"密码文本解密."
).
hasArg
().
build
();
}
}
private
static
Option
gcOption
()
{
return
Option
.
builder
(
CMD_GC
).
longOpt
(
"jvm garbage collection"
).
hasArg
(
false
).
desc
(
"垃圾收集."
).
build
();
}
private
void
ec
(
CommandLine
cmd
)
throws
Exception
{
private
void
ec
(
CommandLine
cmd
)
throws
Exception
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
currentNode
().
getEraseContentEnable
()))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
currentNode
().
getEraseContentEnable
()))
{
logger
.
print
(
"erase content is disabled."
);
logger
.
print
(
"erase content is disabled."
);
...
@@ -323,6 +328,11 @@ public class ActionControl extends ActionBase {
...
@@ -323,6 +328,11 @@ public class ActionControl extends ActionBase {
en
.
execute
(
text
);
en
.
execute
(
text
);
}
}
private
void
gc
()
{
GarbageCollection
garbageCollection
=
new
GarbageCollection
();
garbageCollection
.
execute
();
}
private
Integer
getArgInteger
(
CommandLine
cmd
,
String
opt
,
Integer
defaultValue
)
{
private
Integer
getArgInteger
(
CommandLine
cmd
,
String
opt
,
Integer
defaultValue
)
{
Integer
repeat
=
defaultValue
;
Integer
repeat
=
defaultValue
;
String
r
=
cmd
.
getOptionValue
(
opt
);
String
r
=
cmd
.
getOptionValue
(
opt
);
...
...
o2server/x_console/src/main/java/com/x/server/console/action/GarbageCollection.java
0 → 100644
浏览文件 @
b8ff3dc8
package
com.x.server.console.action
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
public
class
GarbageCollection
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
GarbageCollection
.
class
);
public
boolean
execute
()
{
Runtime
.
getRuntime
().
gc
();
return
true
;
}
}
\ No newline at end of file
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/statement/ActionExecuteV2.java
浏览文件 @
b8ff3dc8
...
@@ -125,6 +125,7 @@ class ActionExecuteV2 extends BaseAction {
...
@@ -125,6 +125,7 @@ class ActionExecuteV2 extends BaseAction {
jpql
=
this
.
joinSql
(
jpql
,
business
);
jpql
=
this
.
joinSql
(
jpql
,
business
);
Query
query
;
Query
query
;
String
upJpql
=
jpql
.
toUpperCase
();
String
upJpql
=
jpql
.
toUpperCase
();
LOGGER
.
debug
(
"script jpql:{}."
,
jpql
);
if
(
upJpql
.
indexOf
(
JOIN_KEY
)
>
-
1
&&
upJpql
.
indexOf
(
JOIN_ON_KEY
)
>
-
1
)
{
if
(
upJpql
.
indexOf
(
JOIN_KEY
)
>
-
1
&&
upJpql
.
indexOf
(
JOIN_ON_KEY
)
>
-
1
)
{
query
=
em
.
createNativeQuery
(
jpql
);
query
=
em
.
createNativeQuery
(
jpql
);
}
else
{
}
else
{
...
@@ -170,6 +171,7 @@ class ActionExecuteV2 extends BaseAction {
...
@@ -170,6 +171,7 @@ class ActionExecuteV2 extends BaseAction {
jpql
=
this
.
joinSql
(
jpql
,
business
);
jpql
=
this
.
joinSql
(
jpql
,
business
);
Query
query
;
Query
query
;
String
upJpql
=
jpql
.
toUpperCase
();
String
upJpql
=
jpql
.
toUpperCase
();
LOGGER
.
debug
(
"jpql:{}."
,
jpql
);
if
(
upJpql
.
indexOf
(
JOIN_KEY
)
>
-
1
&&
upJpql
.
indexOf
(
JOIN_ON_KEY
)
>
-
1
)
{
if
(
upJpql
.
indexOf
(
JOIN_KEY
)
>
-
1
&&
upJpql
.
indexOf
(
JOIN_ON_KEY
)
>
-
1
)
{
query
=
em
.
createNativeQuery
(
jpql
);
query
=
em
.
createNativeQuery
(
jpql
);
}
else
{
}
else
{
...
...
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/jaxrs/statement/ActionExecuteV2.java
浏览文件 @
b8ff3dc8
...
@@ -296,11 +296,11 @@ class ActionExecuteV2 extends BaseAction {
...
@@ -296,11 +296,11 @@ class ActionExecuteV2 extends BaseAction {
if
(
size
>
1
)
{
if
(
size
>
1
)
{
list
.
add
(
"("
);
list
.
add
(
"("
);
}
}
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
FilterEntry
filterEntry
=
wi
.
getFilterList
().
get
(
i
);
FilterEntry
filterEntry
=
wi
.
getFilterList
().
get
(
i
);
if
(
i
>
0
)
{
if
(
i
>
0
)
{
String
joinTag
=
filterEntry
.
logic
;
String
joinTag
=
filterEntry
.
logic
;
if
(
StringUtils
.
isEmpty
(
joinTag
)
||
!
joinTag
.
equalsIgnoreCase
(
SQL_OR
))
{
if
(
StringUtils
.
isEmpty
(
joinTag
)
||
!
joinTag
.
equalsIgnoreCase
(
SQL_OR
))
{
joinTag
=
SQL_AND
;
joinTag
=
SQL_AND
;
}
}
list
.
add
(
joinTag
.
toUpperCase
());
list
.
add
(
joinTag
.
toUpperCase
());
...
...
o2server/x_query_assemble_surface/src/test/resources/test.json
已删除
100644 → 0
浏览文件 @
15e462f3
{
"selectEntryList"
:
[
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"path"
,
"attribute"
:
""
,
"name"
:
""
,
"column"
:
"qsubject"
,
"displayName"
:
""
,
"path"
:
"subject"
},
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"path"
,
"attribute"
:
""
,
"name"
:
""
,
"column"
:
"qamount"
,
"displayName"
:
""
,
"path"
:
"amount"
},
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"path"
,
"attribute"
:
""
,
"name"
:
""
,
"column"
:
"qphone"
,
"displayName"
:
""
,
"path"
:
"phone"
},
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"path"
,
"attribute"
:
""
,
"name"
:
""
,
"column"
:
"qslDate"
,
"displayName"
:
""
,
"path"
:
"slDate"
},
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"path"
,
"attribute"
:
""
,
"name"
:
""
,
"column"
:
"qjzDate"
,
"displayName"
:
""
,
"path"
:
"jzDate"
},
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"attribute"
,
"attribute"
:
"title"
,
"name"
:
""
,
"column"
:
"qtitle"
,
"displayName"
:
""
,
"path"
:
""
},
{
"orderType"
:
"original"
,
"orderRank"
:
0
,
"selectType"
:
"attribute"
,
"attribute"
:
"creatorPerson"
,
"name"
:
""
,
"column"
:
"qcreatorPerson"
,
"displayName"
:
""
,
"path"
:
""
}
],
"whereEntry"
:
{
"applicationList"
:
[
"0c2c3d76-5301-4918-8869-f88de8d2fe57"
],
"processList"
:
[
],
"companyList"
:
[
],
"departmentList"
:
[
],
"personList"
:
[
],
"identityList"
:
[
]
},
"filterEntryList"
:
[
],
"calculateEntryList"
:
[
],
"groupEntry"
:
{
"column"
:
"qphone"
,
"orderType"
:
"original"
},
"dateRangeEntry"
:
{
"dateRangeType"
:
"none"
,
"dateEffectType"
:
"completed"
,
"year"
:
""
,
"month"
:
""
,
"date"
:
""
,
"season"
:
0
,
"week"
:
0
,
"adjust"
:
0
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录