Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
2917441a
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,发现更多精彩内容 >>
提交
2917441a
编写于
8月 12, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
应用市场优化
上级
89f440e8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
4 deletion
+28
-4
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGet.java
...ain/java/com/x/program/center/jaxrs/market/ActionGet.java
+2
-1
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGetInstalledVersion.java
...rogram/center/jaxrs/market/ActionGetInstalledVersion.java
+4
-3
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionListPaging.java
...a/com/x/program/center/jaxrs/market/ActionListPaging.java
+22
-0
未找到文件。
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGet.java
浏览文件 @
2917441a
...
...
@@ -2,6 +2,7 @@ package com.x.program.center.jaxrs.market;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.enums.CommonStatus
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
...
...
@@ -28,7 +29,7 @@ class ActionGet extends BaseAction {
wo
.
setAttList
(
emc
.
listEqual
(
Attachment
.
class
,
Attachment
.
application_FIELDNAME
,
wo
.
getId
()));
InstallLog
installLog
=
emc
.
find
(
id
,
InstallLog
.
class
);
if
(
installLog
!=
null
){
if
(
installLog
!=
null
&&
CommonStatus
.
VALID
.
getValue
().
equals
(
installLog
.
getStatus
())
){
wo
.
setInstalledVersion
(
installLog
.
getVersion
());
}
else
{
wo
.
setInstalledVersion
(
""
);
...
...
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGetInstalledVersion.java
浏览文件 @
2917441a
...
...
@@ -2,6 +2,7 @@ package com.x.program.center.jaxrs.market;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.enums.CommonStatus
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapString
;
...
...
@@ -14,10 +15,10 @@ class ActionGetInstalledVersion extends BaseAction {
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
InstallLog
installLog
=
emc
.
find
(
id
,
InstallLog
.
class
);
Wo
wo
=
new
Wo
();
if
(
installLog
==
null
){
wo
.
setValue
(
""
);
}
else
{
if
(
installLog
!=
null
&&
CommonStatus
.
VALID
.
getValue
().
equals
(
installLog
.
getStatus
())){
wo
.
setValue
(
installLog
.
getVersion
());
}
else
{
wo
.
setValue
(
""
);
}
result
.
setData
(
wo
);
return
result
;
...
...
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionListPaging.java
浏览文件 @
2917441a
...
...
@@ -4,6 +4,7 @@ import com.google.gson.JsonElement;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.enums.CommonStatus
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
...
...
@@ -15,6 +16,7 @@ import com.x.base.core.project.tools.StringTools;
import
com.x.program.center.Business
;
import
com.x.program.center.core.entity.Application
;
import
com.x.program.center.core.entity.Application_
;
import
com.x.program.center.core.entity.InstallLog
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -34,6 +36,7 @@ class ActionListPaging extends BaseAction {
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
Predicate
p
=
this
.
toFilterPredicate
(
effectivePerson
,
business
,
wi
);
...
...
@@ -47,6 +50,14 @@ class ActionListPaging extends BaseAction {
}
else
{
wos
=
emc
.
fetchDescPaging
(
Application
.
class
,
Wo
.
copier
,
p
,
page
,
size
,
orderBy
);
}
for
(
Wo
wo
:
wos
){
InstallLog
installLog
=
emc
.
find
(
wo
.
getId
(),
InstallLog
.
class
);
if
(
installLog
!=
null
&&
CommonStatus
.
VALID
.
getValue
().
equals
(
installLog
.
getStatus
())){
wo
.
setInstalledVersion
(
installLog
.
getVersion
());
}
else
{
wo
.
setInstalledVersion
(
""
);
}
}
result
.
setData
(
wos
);
result
.
setCount
(
emc
.
count
(
Application
.
class
,
p
));
return
result
;
...
...
@@ -156,6 +167,17 @@ class ActionListPaging extends BaseAction {
static
WrapCopier
<
Application
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Application
.
class
,
Wo
.
class
,
JpaObject
.
singularAttributeField
(
Application
.
class
,
true
,
false
),
Arrays
.
asList
(
"abort"
,
"installSteps"
));
@FieldDescribe
(
"已安装的版本,空表示未安装"
)
private
String
installedVersion
;
public
String
getInstalledVersion
()
{
return
installedVersion
;
}
public
void
setInstalledVersion
(
String
installedVersion
)
{
this
.
installedVersion
=
installedVersion
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录