Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz4j Spring R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7后台标准模板
iBiz4j Spring R7
提交
7ec069c0
提交
7ec069c0
编写于
6月 24, 2020
作者:
zhouweidong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
job部署bpmn
上级
40be47e2
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
43 行增加
和
4 行删除
+43
-4
IBZWFFallback.java.ftl
...ain/java/%SYS_PKGPATH%/util/client/IBZWFFallback.java.ftl
+6
-1
IBZWFFeignClient.java.ftl
.../java/%SYS_PKGPATH%/util/client/IBZWFFeignClient.java.ftl
+4
-1
PermissionSyncJob.java.ftl
...in/java/%SYS_PKGPATH%/util/job/PermissionSyncJob.java.ftl
+33
-2
未找到文件。
SLN/%PUBPRJ%-util/src/main/java/%SYS_PKGPATH%/util/client/IBZWFFallback.java.ftl
浏览文件 @
7ec069c0
...
@@ -4,7 +4,7 @@ TARGET=PSSYSTEM
...
@@ -4,7 +4,7 @@ TARGET=PSSYSTEM
package
${
pub
.
getPKGCodeName
()}.
util
.
client
;
package
${
pub
.
getPKGCodeName
()}.
util
.
client
;
import
org
.
springframework
.
stereotype
.
Component
;
import
org
.
springframework
.
stereotype
.
Component
;
import
java
.
util
.
List
;
import
java
.
util
.
*
;
@
Component
@
Component
public
class
IBZWFFallback
implements
IBZWFFeignClient
{
public
class
IBZWFFallback
implements
IBZWFFeignClient
{
...
@@ -18,4 +18,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
...
@@ -18,4 +18,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
public
List
<
String
>
getbusinesskeysByUserId
(
String
system
,
String
userId
,
String
entity
,
String
processDefinitionKey
,
String
taskDefinitionKey
)
{
public
List
<
String
>
getbusinesskeysByUserId
(
String
system
,
String
userId
,
String
entity
,
String
processDefinitionKey
,
String
taskDefinitionKey
)
{
return
null
;
return
null
;
}
}
@
Override
public
Boolean
deployBpmnFile
(
List
<
Map
<
String
,
Object
>>
bpmnfiles
)
{
return
null
;
}
}
}
SLN/%PUBPRJ%-util/src/main/java/%SYS_PKGPATH%/util/client/IBZWFFeignClient.java.ftl
浏览文件 @
7ec069c0
...
@@ -5,7 +5,7 @@ package ${pub.getPKGCodeName()}.util.client;
...
@@ -5,7 +5,7 @@ package ${pub.getPKGCodeName()}.util.client;
import
org
.
springframework
.
cloud
.
openfeign
.
FeignClient
;
import
org
.
springframework
.
cloud
.
openfeign
.
FeignClient
;
import
org
.
springframework
.
web
.
bind
.
annotation
.*;
import
org
.
springframework
.
web
.
bind
.
annotation
.*;
import
java
.
util
.
List
;
import
java
.
util
.
*
;
@
FeignClient
(
value
=
"ibzwf-api"
,
fallback
=
IBZWFFallback
.
class
)
@
FeignClient
(
value
=
"ibzwf-api"
,
fallback
=
IBZWFFallback
.
class
)
public
interface
IBZWFFeignClient
public
interface
IBZWFFeignClient
...
@@ -18,4 +18,7 @@ public interface IBZWFFeignClient
...
@@ -18,4 +18,7 @@ public interface IBZWFFeignClient
@
RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-user-{userId}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks"
)
@
RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-user-{userId}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks"
)
List
<
String
>
getbusinesskeysByUserId
(@
PathVariable
(
"system"
)
String
system
,@
PathVariable
(
"userId"
)
String
userId
,
List
<
String
>
getbusinesskeysByUserId
(@
PathVariable
(
"system"
)
String
system
,@
PathVariable
(
"userId"
)
String
userId
,
@
PathVariable
(
"entity"
)
String
entity
,@
PathVariable
(
"processDefinitionKey"
)
String
processDefinitionKey
,@
PathVariable
(
"taskDefinitionKey"
)
String
taskDefinitionKey
);
@
PathVariable
(
"entity"
)
String
entity
,@
PathVariable
(
"processDefinitionKey"
)
String
processDefinitionKey
,@
PathVariable
(
"taskDefinitionKey"
)
String
taskDefinitionKey
);
@
RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/deploybpmn"
)
Boolean
deployBpmnFile
(@
RequestBody
List
<
Map
<
String
,
Object
>>
bpmnfiles
);
}
}
SLN/%PUBPRJ%-util/src/main/java/%SYS_PKGPATH%/util/job/PermissionSyncJob.java.ftl
浏览文件 @
7ec069c0
...
@@ -2,6 +2,16 @@
...
@@ -2,6 +2,16 @@
TARGET
=
PSSYSTEM
TARGET
=
PSSYSTEM
</#
ibiztemplate
>
</#
ibiztemplate
>
<#
assign
sid
=
sys
.
getName
()/>
<#
assign
sid
=
sys
.
getName
()/>
<#
assign
hasWF
=
false
>
<#
if
sys
.
getAllPSWorkflows
()??>
<#
list
sys
.
getAllPSWorkflows
()
as
wf
>
<#
if
wf
.
getPSWFVersions
()??>
<#
list
wf
.
getPSWFVersions
()
as
wfvs
>
<#
assign
hasWF
=
true
>
</#
list
>
</#
if
>
</#
list
>
</#
if
>
package
${
pub
.
getPKGCodeName
()}.
util
.
job
;
package
${
pub
.
getPKGCodeName
()}.
util
.
job
;
import
${
pub
.
getPKGCodeName
()}.
util
.
client
.
IBZUAAFeignClient
;
import
${
pub
.
getPKGCodeName
()}.
util
.
client
.
IBZUAAFeignClient
;
...
@@ -16,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
...
@@ -16,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import
org
.
springframework
.
context
.
annotation
.
Lazy
;
import
org
.
springframework
.
context
.
annotation
.
Lazy
;
import
org
.
springframework
.
stereotype
.
Component
;
import
org
.
springframework
.
stereotype
.
Component
;
import
java
.
io
.
InputStream
;
import
java
.
io
.
InputStream
;
import
java
.
util
.*;
/**
/**
*
权限:向
uaa
同步当前系统菜单、权限资源任务类
*
权限:向
uaa
同步当前系统菜单、权限资源任务类
...
@@ -25,15 +36,19 @@ import java.io.InputStream;
...
@@ -25,15 +36,19 @@ import java.io.InputStream;
@
ConditionalOnProperty
(
name
=
"ibiz.enablePermissionValid"
,
havingValue
=
"true"
)
@
ConditionalOnProperty
(
name
=
"ibiz.enablePermissionValid"
,
havingValue
=
"true"
)
public
class
PermissionSyncJob
implements
ApplicationRunner
{
public
class
PermissionSyncJob
implements
ApplicationRunner
{
@
Autowired
@
Autowired
@
Lazy
@
Lazy
private
IBZUAAFeignClient
client
;
private
IBZUAAFeignClient
client
;
@
Value
(
"${r'$'}{ibiz.systemid:${sid}}"
)
@
Value
(
"${r'$'}{ibiz.systemid:${sid}}"
)
private
String
systemId
;
private
String
systemId
;
<#
if
hasWF
>
@
Autowired
@
Lazy
private
${
pub
.
getPKGCodeName
()}.
util
.
client
.
IBZWFFeignClient
client2
;
</#
if
>
@
Override
@
Override
public
void
run
(
ApplicationArguments
args
)
{
public
void
run
(
ApplicationArguments
args
)
{
try
{
try
{
...
@@ -53,5 +68,21 @@ public class PermissionSyncJob implements ApplicationRunner {
...
@@ -53,5 +68,21 @@ public class PermissionSyncJob implements ApplicationRunner {
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]"
,
ex
));
log
.
error
(
String
.
format
(
"向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]"
,
ex
));
}
}
<#
if
hasWF
>
try
{
List
<
Map
<
String
,
Object
>>
bpmnfiles
=
new
ArrayList
();
<#
list
sys
.
getAllPSWorkflows
()
as
wf
>
<#
if
wf
.
getPSWFVersions
()??>
<#
list
wf
.
getPSWFVersions
()
as
wfvs
>
bpmnfiles
.
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
"${wfvs.codeName}.bpmn"
,
IOUtils
.
toString
(
this
.
getClass
().
getResourceAsStream
(
"/workflow/${wfvs.codeName}.bpmn"
),
"UTF-8"
));}});
</#
list
>
</#
if
>
</#
list
>
client2
.
deployBpmnFile
(
bpmnfiles
);
}
catch
(
Exception
ex
){
log
.
error
(
String
.
format
(
"部署流程失败,请检查[WF]服务是否正常! [%s]"
,
ex
));
}
</#
if
>
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录