Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
5c65f5b9
提交
5c65f5b9
编写于
12月 24, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibiz-uaa,UAA鉴权]
上级
fa633562
变更
11
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
314 行增加
和
38 行删除
+314
-38
SysAuthLogServiceImpl.java
.../ibizlab/core/uaa/service/impl/SysAuthLogServiceImpl.java
+34
-3
SysOpenAccessServiceImpl.java
...izlab/core/uaa/service/impl/SysOpenAccessServiceImpl.java
+34
-3
SysPSSystemServiceImpl.java
...ibizlab/core/uaa/service/impl/SysPSSystemServiceImpl.java
+34
-3
SysPermissionServiceImpl.java
...izlab/core/uaa/service/impl/SysPermissionServiceImpl.java
+34
-3
SysRolePermissionServiceImpl.java
...b/core/uaa/service/impl/SysRolePermissionServiceImpl.java
+34
-3
SysRoleServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
+34
-3
SysUserAuthServiceImpl.java
...ibizlab/core/uaa/service/impl/SysUserAuthServiceImpl.java
+34
-3
SysUserRoleServiceImpl.java
...ibizlab/core/uaa/service/impl/SysUserRoleServiceImpl.java
+34
-3
SysUserServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysUserServiceImpl.java
+34
-3
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+7
-7
pom.xml
ibzuaa-dependencies/pom.xml
+1
-4
未找到文件。
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysAuthLogServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"SysAuthLogServiceImpl"
)
public
class
SysAuthLogServiceImpl
extends
ServiceImpl
<
SysAuthLogMapper
,
SysAuthLog
>
implements
ISysAuthLogService
{
@Autowired
@Lazy
ISysAuthLogService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -133,21 +136,49 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
SysAuthLog
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysAuthLog
>
create
=
new
ArrayList
<>();
List
<
SysAuthLog
>
update
=
new
ArrayList
<>();
for
(
SysAuthLog
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getLogid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getLogid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
SysAuthLog
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysAuthLog
>
create
=
new
ArrayList
<>();
List
<
SysAuthLog
>
update
=
new
ArrayList
<>();
for
(
SysAuthLog
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getLogid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getLogid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysOpenAccessServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"SysOpenAccessServiceImpl"
)
public
class
SysOpenAccessServiceImpl
extends
ServiceImpl
<
SysOpenAccessMapper
,
SysOpenAccess
>
implements
ISysOpenAccessService
{
@Autowired
@Lazy
ISysOpenAccessService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -133,21 +136,49 @@ public class SysOpenAccessServiceImpl extends ServiceImpl<SysOpenAccessMapper, S
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
SysOpenAccess
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysOpenAccess
>
create
=
new
ArrayList
<>();
List
<
SysOpenAccess
>
update
=
new
ArrayList
<>();
for
(
SysOpenAccess
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
SysOpenAccess
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysOpenAccess
>
create
=
new
ArrayList
<>();
List
<
SysOpenAccess
>
update
=
new
ArrayList
<>();
for
(
SysOpenAccess
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysPSSystemServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"SysPSSystemServiceImpl"
)
public
class
SysPSSystemServiceImpl
extends
ServiceImpl
<
SysPSSystemMapper
,
SysPSSystem
>
implements
ISysPSSystemService
{
@Autowired
@Lazy
ISysPSSystemService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -149,21 +152,49 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
SysPSSystem
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysPSSystem
>
create
=
new
ArrayList
<>();
List
<
SysPSSystem
>
update
=
new
ArrayList
<>();
for
(
SysPSSystem
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getPssystemid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
SysPSSystem
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysPSSystem
>
create
=
new
ArrayList
<>();
List
<
SysPSSystem
>
update
=
new
ArrayList
<>();
for
(
SysPSSystem
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getPssystemid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
@Override
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysPermissionServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -51,6 +51,9 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
uaa
.
service
.
ISysRolePermissionService
sysrolepermissionService
;
@Autowired
@Lazy
ISysPermissionService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -138,21 +141,49 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
SysPermission
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysPermission
>
create
=
new
ArrayList
<>();
List
<
SysPermission
>
update
=
new
ArrayList
<>();
for
(
SysPermission
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getPermissionid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getPermissionid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
SysPermission
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysPermission
>
create
=
new
ArrayList
<>();
List
<
SysPermission
>
update
=
new
ArrayList
<>();
for
(
SysPermission
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getPermissionid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getPermissionid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRolePermissionServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -54,6 +54,9 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
uaa
.
service
.
ISysRoleService
sysroleService
;
@Autowired
@Lazy
ISysRolePermissionService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -144,7 +147,7 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -152,7 +155,21 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Transactional
public
boolean
saveBatch
(
Collection
<
SysRolePermission
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysRolePermission
>
create
=
new
ArrayList
<>();
List
<
SysRolePermission
>
update
=
new
ArrayList
<>();
for
(
SysRolePermission
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getRolepermissionid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getRolepermissionid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -160,7 +177,21 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Transactional
public
void
saveBatch
(
List
<
SysRolePermission
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysRolePermission
>
create
=
new
ArrayList
<>();
List
<
SysRolePermission
>
update
=
new
ArrayList
<>();
for
(
SysRolePermission
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getRolepermissionid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getRolepermissionid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -56,6 +56,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
uaa
.
service
.
ISysUserRoleService
sysuserroleService
;
@Autowired
@Lazy
ISysRoleService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -166,7 +169,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -174,7 +177,21 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Transactional
public
boolean
saveBatch
(
Collection
<
SysRole
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysRole
>
create
=
new
ArrayList
<>();
List
<
SysRole
>
update
=
new
ArrayList
<>();
for
(
SysRole
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getRoleid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getRoleid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -182,7 +199,21 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Transactional
public
void
saveBatch
(
List
<
SysRole
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysRole
>
create
=
new
ArrayList
<>();
List
<
SysRole
>
update
=
new
ArrayList
<>();
for
(
SysRole
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getRoleid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getRoleid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserAuthServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -51,6 +51,9 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
uaa
.
service
.
ISysUserService
sysuserService
;
@Autowired
@Lazy
ISysUserAuthService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -141,7 +144,7 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -149,7 +152,21 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Transactional
public
boolean
saveBatch
(
Collection
<
SysUserAuth
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysUserAuth
>
create
=
new
ArrayList
<>();
List
<
SysUserAuth
>
update
=
new
ArrayList
<>();
for
(
SysUserAuth
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -157,7 +174,21 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Transactional
public
void
saveBatch
(
List
<
SysUserAuth
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysUserAuth
>
create
=
new
ArrayList
<>();
List
<
SysUserAuth
>
update
=
new
ArrayList
<>();
for
(
SysUserAuth
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserRoleServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -54,6 +54,9 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
uaa
.
service
.
ISysUserService
sysuserService
;
@Autowired
@Lazy
ISysUserRoleService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -144,7 +147,7 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -152,7 +155,21 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Transactional
public
boolean
saveBatch
(
Collection
<
SysUserRole
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysUserRole
>
create
=
new
ArrayList
<>();
List
<
SysUserRole
>
update
=
new
ArrayList
<>();
for
(
SysUserRole
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getUserroleid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getUserroleid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -160,7 +177,21 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Transactional
public
void
saveBatch
(
List
<
SysUserRole
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysUserRole
>
create
=
new
ArrayList
<>();
List
<
SysUserRole
>
update
=
new
ArrayList
<>();
for
(
SysUserRole
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getUserroleid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getUserroleid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserServiceImpl.java
浏览文件 @
5c65f5b9
...
...
@@ -54,6 +54,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
uaa
.
service
.
ISysUserRoleService
sysuserroleService
;
@Autowired
@Lazy
ISysUserService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -139,21 +142,49 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
SysUser
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysUser
>
create
=
new
ArrayList
<>();
List
<
SysUser
>
update
=
new
ArrayList
<>();
for
(
SysUser
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getUserid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getUserid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
SysUser
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
SysUser
>
create
=
new
ArrayList
<>();
List
<
SysUser
>
update
=
new
ArrayList
<>();
for
(
SysUser
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getUserid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getUserid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
5c65f5b9
...
...
@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_permission-
5
-4"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_permission-
6
-4"
>
<createTable
tableName=
"IBZPERMISSION"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
...
...
@@ -106,7 +106,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role-4
0
-5"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role-4
2
-5"
>
<createTable
tableName=
"IBZROLE"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
...
...
@@ -130,7 +130,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role_permission-1
1
-6"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role_permission-1
4
-6"
>
<createTable
tableName=
"IBZROLE_PERMISSION"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
...
...
@@ -189,16 +189,16 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_role-4
0
-9"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_role-4
2
-9"
>
<addForeignKeyConstraint
baseColumnNames=
"PROLEID"
baseTableName=
"IBZROLE"
constraintName=
"DER1N_SYS_ROLE_SYS_ROLE_PROLEI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_role_permission-1
1
-10"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_
PERMISSIONID"
baseTableName=
"IBZROLE_PERMISSION"
constraintName=
"DER1N_SYS_ROLE_PERMISSION_SYS_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_PERMISSIONID"
referencedTableName=
"IBZPERMISSION
"
validate=
"true"
/>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_role_permission-1
4
-10"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_
ROLEID"
baseTableName=
"IBZROLE_PERMISSION"
constraintName=
"DER1N_SYS_ROLE_PERMISSION_SYS_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE
"
validate=
"true"
/>
</changeSet>
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_user_role-13-1
2
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_user_role-13-1
1
"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_ROLEID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_ROLE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
...
...
ibzuaa-dependencies/pom.xml
浏览文件 @
5c65f5b9
...
...
@@ -31,9 +31,6 @@
<mybatis-plus.version>
3.3.1
</mybatis-plus.version>
<mybatis-plus-dynamic-datasource.version>
3.0.0
</mybatis-plus-dynamic-datasource.version>
<!-- Liquibase -->
<liquibase.version>
3.6.3
</liquibase.version>
<!-- Swagger2 -->
<springfox-swagger.version>
2.9.2
</springfox-swagger.version>
...
...
@@ -60,7 +57,7 @@
<jsonwebtoken-jjwt.version>
0.9.1
</jsonwebtoken-jjwt.version>
<!--Liquibase数据库版本更新工具-->
<liquibase.version>
3.
8.7
</liquibase.version>
<liquibase.version>
3.
9.0
</liquibase.version>
<!--H2内存数据库-->
<h2.version>
1.4.200
</h2.version>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录