Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
3264b81a
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,发现更多精彩内容 >>
提交
3264b81a
编写于
7月 09, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新版应用市场优化2
上级
5f62dcd8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
125 addition
and
2 deletion
+125
-2
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
+19
-0
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGetInstallLog.java
...om/x/program/center/jaxrs/market/ActionGetInstallLog.java
+34
-0
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGetInstalledVersion.java
...rogram/center/jaxrs/market/ActionGetInstalledVersion.java
+30
-0
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionInstallOrUpdate.java
.../x/program/center/jaxrs/market/ActionInstallOrUpdate.java
+4
-0
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/MarketAction.java
.../java/com/x/program/center/jaxrs/market/MarketAction.java
+37
-1
o2server/x_program_center_core_entity/src/main/java/com/x/program/center/core/entity/InstallLog.java
...ain/java/com/x/program/center/core/entity/InstallLog.java
+1
-1
未找到文件。
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGet.java
浏览文件 @
3264b81a
...
...
@@ -10,6 +10,7 @@ import com.x.base.core.project.http.ActionResult;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.program.center.core.entity.Application
;
import
com.x.program.center.core.entity.Attachment
;
import
com.x.program.center.core.entity.InstallLog
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -25,6 +26,13 @@ class ActionGet extends BaseAction {
}
Wo
wo
=
Wo
.
copier
.
copy
(
app
);
wo
.
setAttList
(
emc
.
listEqual
(
Attachment
.
class
,
Attachment
.
application_FIELDNAME
,
wo
.
getId
()));
InstallLog
installLog
=
emc
.
find
(
id
,
InstallLog
.
class
);
if
(
installLog
!=
null
){
wo
.
setInstalledVersion
(
installLog
.
getVersion
());
}
else
{
wo
.
setInstalledVersion
(
""
);
}
result
.
setData
(
wo
);
return
result
;
}
...
...
@@ -38,6 +46,9 @@ class ActionGet extends BaseAction {
@FieldDescribe
(
"图片列表"
)
private
List
<
Attachment
>
attList
=
new
ArrayList
<>();
@FieldDescribe
(
"已安装的版本,空表示未安装"
)
private
String
installedVersion
;
public
List
<
Attachment
>
getAttList
()
{
return
attList
;
}
...
...
@@ -45,5 +56,13 @@ class ActionGet extends BaseAction {
public
void
setAttList
(
List
<
Attachment
>
attList
)
{
this
.
attList
=
attList
;
}
public
String
getInstalledVersion
()
{
return
installedVersion
;
}
public
void
setInstalledVersion
(
String
installedVersion
)
{
this
.
installedVersion
=
installedVersion
;
}
}
}
\ No newline at end of file
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGetInstallLog.java
0 → 100644
浏览文件 @
3264b81a
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.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.program.center.core.entity.InstallLog
;
class
ActionGetInstallLog
extends
BaseAction
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
InstallLog
installLog
=
emc
.
find
(
id
,
InstallLog
.
class
);
if
(
installLog
==
null
){
throw
new
ExceptionEntityNotExist
(
id
,
InstallLog
.
class
);
}
Wo
wo
=
Wo
.
copier
.
copy
(
installLog
);
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
InstallLog
{
private
static
final
long
serialVersionUID
=
7332385892650739407L
;
static
WrapCopier
<
InstallLog
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
InstallLog
.
class
,
Wo
.
class
,
null
,
Wo
.
FieldsInvisible
);
}
}
\ No newline at end of file
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionGetInstalledVersion.java
0 → 100644
浏览文件 @
3264b81a
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.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapString
;
import
com.x.program.center.core.entity.InstallLog
;
class
ActionGetInstalledVersion
extends
BaseAction
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
InstallLog
installLog
=
emc
.
find
(
id
,
InstallLog
.
class
);
Wo
wo
=
new
Wo
();
if
(
installLog
==
null
){
wo
.
setValue
(
""
);
}
else
{
wo
.
setValue
(
installLog
.
getVersion
());
}
result
.
setData
(
wo
);
return
result
;
}
}
public
static
class
Wo
extends
WrapString
{
}
}
\ No newline at end of file
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/ActionInstallOrUpdate.java
浏览文件 @
3264b81a
...
...
@@ -144,6 +144,7 @@ class ActionInstallOrUpdate extends BaseAction {
.
putQuery
(
x_processplatform_assemble_designer
.
class
,
Applications
.
joinQueryUri
(
"input"
,
"cover"
),
obj
)
.
getData
(
WoId
.
class
).
getId
());
obj
.
setIcon
(
null
);
obj
.
setApplicationDictList
(
null
);
obj
.
setFileList
(
null
);
obj
.
setFormList
(
null
);
...
...
@@ -156,6 +157,7 @@ class ActionInstallOrUpdate extends BaseAction {
.
putQuery
(
x_cms_assemble_control
.
class
,
Applications
.
joinQueryUri
(
"input"
,
"cover"
),
obj
)
.
getData
(
WoId
.
class
).
getId
());
obj
.
setAppIcon
(
null
);
obj
.
setAppDictList
(
null
);
obj
.
setCategoryInfoList
(
null
);
obj
.
setFileList
(
null
);
...
...
@@ -168,6 +170,7 @@ class ActionInstallOrUpdate extends BaseAction {
.
putQuery
(
x_portal_assemble_designer
.
class
,
Applications
.
joinQueryUri
(
"input"
,
"cover"
),
obj
)
.
getData
(
WoId
.
class
).
getId
());
obj
.
setIcon
(
null
);
obj
.
setFileList
(
null
);
obj
.
setPageList
(
null
);
obj
.
setScriptList
(
null
);
...
...
@@ -180,6 +183,7 @@ class ActionInstallOrUpdate extends BaseAction {
.
putQuery
(
x_query_assemble_designer
.
class
,
Applications
.
joinQueryUri
(
"input"
,
"cover"
),
obj
)
.
getData
(
WoId
.
class
).
getId
());
obj
.
setIcon
(
null
);
obj
.
setRevealList
(
null
);
obj
.
setViewList
(
null
);
obj
.
setStatementList
(
null
);
...
...
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/market/MarketAction.java
浏览文件 @
3264b81a
...
...
@@ -139,7 +139,7 @@ public class MarketAction extends StandardJaxrsAction {
@Path
(
"list/category"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
installOrUpdate
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
public
void
listCategory
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
ActionResult
<
ActionListCategory
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
...
...
@@ -151,4 +151,40 @@ public class MarketAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"获取指定应用安装记录."
,
action
=
ActionGetInstallLog
.
class
)
@GET
@Path
(
"{flag}/install/log"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
getInstallLog
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"应用标识"
)
@PathParam
(
"flag"
)
String
flag
)
{
ActionResult
<
ActionGetInstallLog
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionGetInstallLog
().
execute
(
effectivePerson
,
flag
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"获取指定应用已安装的版本,返回空表示未安装."
,
action
=
ActionGetInstalledVersion
.
class
)
@GET
@Path
(
"{flag}/installed/version"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
getInstalledVersion
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"应用标识"
)
@PathParam
(
"flag"
)
String
flag
)
{
ActionResult
<
ActionGetInstalledVersion
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionGetInstalledVersion
().
execute
(
effectivePerson
,
flag
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
}
\ No newline at end of file
o2server/x_program_center_core_entity/src/main/java/com/x/program/center/core/entity/InstallLog.java
浏览文件 @
3264b81a
...
...
@@ -71,7 +71,7 @@ public class InstallLog extends SliceJpaObject {
@FieldDescribe
(
"安装概要内容."
)
@Lob
@Basic
(
fetch
=
FetchType
.
EAGER
)
@Column
(
length
=
JpaObject
.
length_
2
K
,
name
=
ColumnNamePrefix
+
data_FIELDNAME
)
@Column
(
length
=
JpaObject
.
length_
4
K
,
name
=
ColumnNamePrefix
+
data_FIELDNAME
)
private
String
data
;
public
static
final
String
installPerson_FIELDNAME
=
"installPerson"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录