Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
24261e7e
提交
24261e7e
编写于
1月 02, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibz-wf,统一工作流]
上级
d033f60d
变更
14
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
110 行增加
和
93 行删除
+110
-93
ibzwf-app-web.yaml
ibzwf-app/ibzwf-app-web/src/main/docker/ibzwf-app-web.yaml
+4
-0
logback-spring.xml
ibzwf-boot/src/main/resources/logback-spring.xml
+5
-6
IWFGroupService.java
...ava/cn/ibizlab/core/workflow/service/IWFGroupService.java
+1
-0
IWFMemberService.java
...va/cn/ibizlab/core/workflow/service/IWFMemberService.java
+1
-0
IWFUserService.java
...java/cn/ibizlab/core/workflow/service/IWFUserService.java
+1
-0
WFGroupServiceImpl.java
...bizlab/core/workflow/service/impl/WFGroupServiceImpl.java
+9
-8
WFMemberServiceImpl.java
...izlab/core/workflow/service/impl/WFMemberServiceImpl.java
+12
-11
WFProcessDefinitionServiceImpl.java
...workflow/service/impl/WFProcessDefinitionServiceImpl.java
+9
-8
WFSystemServiceImpl.java
...izlab/core/workflow/service/impl/WFSystemServiceImpl.java
+9
-8
WFUserServiceImpl.java
...ibizlab/core/workflow/service/impl/WFUserServiceImpl.java
+9
-8
pom.xml
ibzwf-dependencies/pom.xml
+1
-2
ibzwf-provider-api.yaml
...bzwf-provider-api/src/main/docker/ibzwf-provider-api.yaml
+4
-0
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+44
-42
application-sys.yml
ibzwf-util/src/main/resources/application-sys.yml
+1
-0
未找到文件。
ibzwf-app/ibzwf-app-web/src/main/docker/ibzwf-app-web.yaml
浏览文件 @
24261e7e
...
@@ -14,6 +14,10 @@ services:
...
@@ -14,6 +14,10 @@ services:
memory
:
400M
memory
:
400M
mode
:
replicated
mode
:
replicated
replicas
:
1
replicas
:
1
restart_policy
:
condition
:
on-failure
max_attempts
:
3
window
:
120s
volumes
:
volumes
:
-
"
nfs:/app/file"
-
"
nfs:/app/file"
...
...
ibzwf-boot/src/main/resources/logback-spring.xml
浏览文件 @
24261e7e
...
@@ -20,18 +20,17 @@
...
@@ -20,18 +20,17 @@
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_PATH}/ibzwf.%d{yyyy-MM-dd}.log
</FileNamePattern>
<FileNamePattern>
${LOG_PATH}/ibzwf.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件最大的大小-->
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${LOG_PATTERN}
</pattern>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
100MB
</MaxFileSize>
</triggeringPolicy>
</appender>
</appender>
<!-- 日志输出级别 -->
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<root
level=
"INFO"
>
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFGroupService.java
浏览文件 @
24261e7e
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFGroup] 服务对象接口
* 实体[WFGroup] 服务对象接口
*/
*/
@com
.
baomidou
.
dynamic
.
datasource
.
annotation
.
DS
(
"db2"
)
public
interface
IWFGroupService
extends
IService
<
WFGroup
>
{
public
interface
IWFGroupService
extends
IService
<
WFGroup
>
{
boolean
create
(
WFGroup
et
);
boolean
create
(
WFGroup
et
);
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFMemberService.java
浏览文件 @
24261e7e
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFMember] 服务对象接口
* 实体[WFMember] 服务对象接口
*/
*/
@com
.
baomidou
.
dynamic
.
datasource
.
annotation
.
DS
(
"db2"
)
public
interface
IWFMemberService
extends
IService
<
WFMember
>
{
public
interface
IWFMemberService
extends
IService
<
WFMember
>
{
boolean
create
(
WFMember
et
);
boolean
create
(
WFMember
et
);
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFUserService.java
浏览文件 @
24261e7e
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFUser] 服务对象接口
* 实体[WFUser] 服务对象接口
*/
*/
@com
.
baomidou
.
dynamic
.
datasource
.
annotation
.
DS
(
"db2"
)
public
interface
IWFUserService
extends
IService
<
WFUser
>
{
public
interface
IWFUserService
extends
IService
<
WFUser
>
{
boolean
create
(
WFUser
et
);
boolean
create
(
WFUser
et
);
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFGroupServiceImpl.java
浏览文件 @
24261e7e
...
@@ -51,9 +51,6 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -51,9 +51,6 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
core
.
workflow
.
service
.
IWFMemberService
wfmemberService
;
protected
cn
.
ibizlab
.
core
.
workflow
.
service
.
IWFMemberService
wfmemberService
;
@Autowired
@Lazy
IWFGroupService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -143,7 +140,7 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -143,7 +140,7 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
return
checkKey
(
et
)
?
getProxyService
().
update
(
et
)
:
getProxyService
()
.
create
(
et
);
}
}
}
}
...
@@ -160,10 +157,10 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -160,10 +157,10 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
return
true
;
return
true
;
}
}
...
@@ -181,10 +178,10 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -181,10 +178,10 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
}
}
...
@@ -233,6 +230,10 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -233,6 +230,10 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
public
IWFGroupService
getProxyService
()
{
return
cn
.
ibizlab
.
util
.
security
.
SpringContextHolder
.
getBean
(
this
.
getClass
());
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFMemberServiceImpl.java
浏览文件 @
24261e7e
...
@@ -54,9 +54,6 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -54,9 +54,6 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
core
.
workflow
.
service
.
IWFUserService
wfuserService
;
protected
cn
.
ibizlab
.
core
.
workflow
.
service
.
IWFUserService
wfuserService
;
@Autowired
@Lazy
IWFMemberService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -147,7 +144,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -147,7 +144,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
return
checkKey
(
et
)
?
getProxyService
().
update
(
et
)
:
getProxyService
()
.
create
(
et
);
}
}
}
}
...
@@ -165,10 +162,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -165,10 +162,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
return
true
;
return
true
;
}
}
...
@@ -187,10 +184,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -187,10 +184,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
}
}
...
@@ -204,6 +201,9 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -204,6 +201,9 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
this
.
remove
(
new
QueryWrapper
<
WFMember
>().
eq
(
"groupid"
,
id
));
this
.
remove
(
new
QueryWrapper
<
WFMember
>().
eq
(
"groupid"
,
id
));
}
}
public
IWFMemberService
getProxyService
()
{
return
cn
.
ibizlab
.
util
.
security
.
SpringContextHolder
.
getBean
(
this
.
getClass
());
}
@Override
@Override
public
void
saveByGroupid
(
String
id
,
List
<
WFMember
>
list
)
{
public
void
saveByGroupid
(
String
id
,
List
<
WFMember
>
list
)
{
if
(
list
==
null
)
if
(
list
==
null
)
...
@@ -226,11 +226,11 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -226,11 +226,11 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
_create
.
add
(
sub
);
_create
.
add
(
sub
);
}
}
if
(
_update
.
size
()>
0
)
if
(
_update
.
size
()>
0
)
proxyService
.
updateBatch
(
_update
);
getProxyService
()
.
updateBatch
(
_update
);
if
(
_create
.
size
()>
0
)
if
(
_create
.
size
()>
0
)
proxyService
.
createBatch
(
_create
);
getProxyService
()
.
createBatch
(
_create
);
if
(
delIds
.
size
()>
0
)
if
(
delIds
.
size
()>
0
)
proxyService
.
removeBatch
(
delIds
);
getProxyService
()
.
removeBatch
(
delIds
);
}
}
@Override
@Override
...
@@ -337,6 +337,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -337,6 +337,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFProcessDefinitionServiceImpl.java
浏览文件 @
24261e7e
...
@@ -48,9 +48,6 @@ import org.springframework.util.StringUtils;
...
@@ -48,9 +48,6 @@ import org.springframework.util.StringUtils;
@Service
(
"WFProcessDefinitionServiceImpl"
)
@Service
(
"WFProcessDefinitionServiceImpl"
)
public
class
WFProcessDefinitionServiceImpl
extends
ServiceImpl
<
WFProcessDefinitionMapper
,
WFProcessDefinition
>
implements
IWFProcessDefinitionService
{
public
class
WFProcessDefinitionServiceImpl
extends
ServiceImpl
<
WFProcessDefinitionMapper
,
WFProcessDefinition
>
implements
IWFProcessDefinitionService
{
@Autowired
@Lazy
IWFProcessDefinitionService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -136,7 +133,7 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -136,7 +133,7 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
return
checkKey
(
et
)
?
getProxyService
().
update
(
et
)
:
getProxyService
()
.
create
(
et
);
}
}
}
}
...
@@ -153,10 +150,10 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -153,10 +150,10 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
return
true
;
return
true
;
}
}
...
@@ -174,10 +171,10 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -174,10 +171,10 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
}
}
...
@@ -226,6 +223,10 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -226,6 +223,10 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
public
IWFProcessDefinitionService
getProxyService
()
{
return
cn
.
ibizlab
.
util
.
security
.
SpringContextHolder
.
getBean
(
this
.
getClass
());
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFSystemServiceImpl.java
浏览文件 @
24261e7e
...
@@ -48,9 +48,6 @@ import org.springframework.util.StringUtils;
...
@@ -48,9 +48,6 @@ import org.springframework.util.StringUtils;
@Service
(
"WFSystemServiceImpl"
)
@Service
(
"WFSystemServiceImpl"
)
public
class
WFSystemServiceImpl
extends
ServiceImpl
<
WFSystemMapper
,
WFSystem
>
implements
IWFSystemService
{
public
class
WFSystemServiceImpl
extends
ServiceImpl
<
WFSystemMapper
,
WFSystem
>
implements
IWFSystemService
{
@Autowired
@Lazy
IWFSystemService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -136,7 +133,7 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -136,7 +133,7 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
return
checkKey
(
et
)
?
getProxyService
().
update
(
et
)
:
getProxyService
()
.
create
(
et
);
}
}
}
}
...
@@ -153,10 +150,10 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -153,10 +150,10 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
return
true
;
return
true
;
}
}
...
@@ -174,10 +171,10 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -174,10 +171,10 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
}
}
...
@@ -226,6 +223,10 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -226,6 +223,10 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
public
IWFSystemService
getProxyService
()
{
return
cn
.
ibizlab
.
util
.
security
.
SpringContextHolder
.
getBean
(
this
.
getClass
());
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFUserServiceImpl.java
浏览文件 @
24261e7e
...
@@ -51,9 +51,6 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -51,9 +51,6 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
core
.
workflow
.
service
.
IWFMemberService
wfmemberService
;
protected
cn
.
ibizlab
.
core
.
workflow
.
service
.
IWFMemberService
wfmemberService
;
@Autowired
@Lazy
IWFUserService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -139,7 +136,7 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -139,7 +136,7 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
return
checkKey
(
et
)
?
getProxyService
().
update
(
et
)
:
getProxyService
()
.
create
(
et
);
}
}
}
}
...
@@ -156,10 +153,10 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -156,10 +153,10 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
return
true
;
return
true
;
}
}
...
@@ -177,10 +174,10 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -177,10 +174,10 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
}
}
}
}
if
(
create
.
size
()
>
0
)
{
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
getProxyService
()
.
createBatch
(
create
);
}
}
if
(
update
.
size
()
>
0
)
{
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
getProxyService
()
.
updateBatch
(
update
);
}
}
}
}
...
@@ -250,6 +247,10 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -250,6 +247,10 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
public
IWFUserService
getProxyService
()
{
return
cn
.
ibizlab
.
util
.
security
.
SpringContextHolder
.
getBean
(
this
.
getClass
());
}
}
}
...
...
ibzwf-dependencies/pom.xml
浏览文件 @
24261e7e
...
@@ -261,6 +261,7 @@
...
@@ -261,6 +261,7 @@
<version>
${baomidou-jobs.version}
</version>
<version>
${baomidou-jobs.version}
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
@@ -344,7 +345,6 @@
...
@@ -344,7 +345,6 @@
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
</dependency>
<!-- mp动态数据源 -->
<!-- mp动态数据源 -->
<dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<groupId>
com.baomidou
</groupId>
...
@@ -352,7 +352,6 @@
...
@@ -352,7 +352,6 @@
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
ibzwf-provider/ibzwf-provider-api/src/main/docker/ibzwf-provider-api.yaml
浏览文件 @
24261e7e
...
@@ -14,6 +14,10 @@ services:
...
@@ -14,6 +14,10 @@ services:
memory
:
400M
memory
:
400M
mode
:
replicated
mode
:
replicated
replicas
:
1
replicas
:
1
restart_policy
:
condition
:
on-failure
max_attempts
:
3
window
:
120s
volumes
:
volumes
:
-
"
nfs:/app/file"
-
"
nfs:/app/file"
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
24261e7e
...
@@ -13,6 +13,7 @@ import org.springframework.boot.ApplicationRunner;
...
@@ -13,6 +13,7 @@ import org.springframework.boot.ApplicationRunner;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
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
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.*
;
import
java.util.*
;
...
@@ -25,74 +26,75 @@ import java.util.*;
...
@@ -25,74 +26,75 @@ import java.util.*;
@ConditionalOnProperty
(
name
=
"ibiz.enablePermissionValid"
,
havingValue
=
"true"
)
@ConditionalOnProperty
(
name
=
"ibiz.enablePermissionValid"
,
havingValue
=
"true"
)
public
class
PermissionSyncJob
implements
ApplicationRunner
{
public
class
PermissionSyncJob
implements
ApplicationRunner
{
@Autowired
@Lazy
private
IBZUAAFeignClient
client
;
@Value
(
"${ibiz.systemid:ibzwf}"
)
@Value
(
"${ibiz.systemid:ibzwf}"
)
private
String
systemId
;
private
String
systemId
;
@Value
(
"${ibiz.systemname:ibzwf}"
)
@Value
(
"${ibiz.systemname:ibzwf}"
)
private
String
systemName
;
private
String
systemName
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
util
.
client
.
IBZNotifyFeignClient
notifyFeign
Client
;
private
IBZUAAFeignClient
uaa
Client
;
@Autowired
@Autowired
@Lazy
@Lazy
IBZLiteFeignClient
lite
Feign
Client
;
IBZLiteFeignClient
liteClient
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
util
.
client
.
IBZNotifyFeignClient
notifyClient
;
@Override
@Override
public
void
run
(
ApplicationArguments
args
)
{
public
void
run
(
ApplicationArguments
args
)
{
try
{
try
{
Thread
.
sleep
(
10000
);
Thread
.
sleep
(
10000
);
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//获取当前系统所有实体资源能力
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//权限资源
String
permissionResult
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
if
(!
ObjectUtils
.
isEmpty
(
permission
))
{
JSONObject
system
=
new
JSONObject
();
String
strPermission
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
system
.
put
(
"pssystemid"
,
systemId
);
JSONObject
system
=
new
JSONObject
()
{{
system
.
put
(
"pssystemname"
,
systemName
);
put
(
"pssystemid"
,
systemId
);
system
.
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
permissionResult
));
put
(
"pssystemname"
,
systemName
);
system
.
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
permissionResult
.
getBytes
()));
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
strPermission
));
if
(
client
.
syncSysAuthority
(
system
))
{
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
strPermission
.
getBytes
()));
log
.
info
(
"向[UAA]同步系统资源成功"
);
}};
}
else
{
if
(
uaaClient
.
syncSysAuthority
(
system
))
{
log
.
error
(
"向[UAA]同步系统资源失败"
);
log
.
info
(
"向[uaa]同步系统资源成功"
);
}
else
{
log
.
error
(
"向[uaa]同步系统资源失败"
);
}
}
}
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
log
.
error
(
"向[uaa]同步系统资源失败,请检查[uaa]服务是否正常运行! {}"
,
ex
.
getMessage
());
log
.
error
(
String
.
format
(
"向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]"
,
ex
));
}
}
try
{
try
{
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzwf.json"
);
//获取当前系统所有实体资源能力
InputStream
model
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzwf.json"
);
//系统模型
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
if
(!
ObjectUtils
.
isEmpty
(
model
))
{
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
)))
{
String
strModel
=
IOUtils
.
toString
(
model
,
"UTF-8"
);
log
.
info
(
"向[lite]同步系统模型成功"
);
if
(
liteClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strModel
)))
{
}
else
{
log
.
info
(
"向[lite]同步模型成功"
);
log
.
error
(
"向[lite]同步系统模型失败"
);
}
else
{
log
.
error
(
"向[lite]同步模型失败"
);
}
}
}
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
log
.
error
(
"向[lite]同步系统模型失败,请检查[lite]服务是否正常运行! {}"
,
ex
.
getMessage
());
log
.
error
(
String
.
format
(
"向[lite]同步系统模型失败,请检查[lite]服务是否正常! [%s]"
,
ex
));
}
}
try
{
try
{
InputStream
msgTemplate
=
this
.
getClass
().
getResourceAsStream
(
"/msgtempl/systemMsgTempl.json"
);
//获取当前系统所有实体资源能力
InputStream
template
=
this
.
getClass
().
getResourceAsStream
(
"/msgtempl/systemMsgTempl.json"
);
//消息模板
String
strMsgTemplate
=
IOUtils
.
toString
(
msgTemplate
,
"UTF-8"
);
if
(!
ObjectUtils
.
isEmpty
(
template
))
{
JSONObject
template
=
new
JSONObject
();
String
strTemplate
=
IOUtils
.
toString
(
template
,
"UTF-8"
);
template
.
put
(
"template"
,
JSONArray
.
parseArray
(
strMsgTemplate
));
if
(
notifyClient
.
createMsgTemplate
(
new
JSONObject
()
{{
if
(
notifyFeignClient
.
createMsgTemplate
(
template
))
{
put
(
"template"
,
JSONArray
.
parseArray
(
strTemplate
));
log
.
info
(
"推送消息模板成功"
);
}}))
{
}
else
{
log
.
info
(
"向[notify]同步消息模板成功"
);
log
.
error
(
"推送消息模板失败"
);
}
else
{
log
.
error
(
"向[notify]同步消息模板失败"
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
x
)
{
log
.
error
(
"
推送消息模板失败"
);
log
.
error
(
"
向[notify]同步消息模板失败,请检查[notify]服务是否正常运行! {}"
,
ex
.
getMessage
()
);
}
}
}
}
}
}
\ No newline at end of file
ibzwf-util/src/main/resources/application-sys.yml
浏览文件 @
24261e7e
...
@@ -125,3 +125,4 @@ server:
...
@@ -125,3 +125,4 @@ server:
min-response-size
:
10240
min-response-size
:
10240
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录