Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
d5960556
提交
d5960556
编写于
5月 21, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
6a49ea5e
变更
10
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
4 行增加
和
88 行删除
+4
-88
IBZDepartment.java
...rc/main/java/cn/ibizlab/core/ou/domain/IBZDepartment.java
+0
-8
IBZEmployee.java
.../src/main/java/cn/ibizlab/core/ou/domain/IBZEmployee.java
+0
-8
IBZDepartmentMapper.java
...n/java/cn/ibizlab/core/ou/mapper/IBZDepartmentMapper.java
+1
-1
IBZDeptMemberMapper.java
...n/java/cn/ibizlab/core/ou/mapper/IBZDeptMemberMapper.java
+1
-1
IBZEmployeeMapper.java
...ain/java/cn/ibizlab/core/ou/mapper/IBZEmployeeMapper.java
+1
-1
IBZOrganizationMapper.java
...java/cn/ibizlab/core/ou/mapper/IBZOrganizationMapper.java
+1
-1
IIBZDeptMemberService.java
...ava/cn/ibizlab/core/ou/service/IIBZDeptMemberService.java
+0
-2
IBZDepartmentServiceImpl.java
...bizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
+0
-4
IBZDeptMemberServiceImpl.java
...bizlab/core/ou/service/impl/IBZDeptMemberServiceImpl.java
+0
-58
IBZEmployeeServiceImpl.java
.../ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
+0
-4
未找到文件。
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/IBZDepartment.java
浏览文件 @
d5960556
...
...
@@ -174,14 +174,6 @@ public class IBZDepartment extends EntityMP implements Serializable {
private
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
org
;
/**
* 部门成员
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
List
<
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZDeptMember
>
ibzdeptmember
;
/**
* 设置 [部门代码]
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/IBZEmployee.java
浏览文件 @
d5960556
...
...
@@ -315,14 +315,6 @@ public class IBZEmployee extends EntityMP implements Serializable {
private
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
org
;
/**
* 部门成员
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
List
<
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZDeptMember
>
ibzdeptmember
;
/**
* 设置 [用户全局名]
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZDepartmentMapper.java
浏览文件 @
d5960556
...
...
@@ -31,7 +31,7 @@ public interface IBZDepartmentMapper extends BaseMapper<IBZDepartment>{
@CacheEvict
(
value
=
"ibzdepartment"
,
key
=
"'row:'+#p0.deptid"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
IBZDepartment
entity
);
@CacheEvict
(
value
=
"ibzdepartment"
,
key
=
"'row:'+#p0.deptid"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZDepartment
entity
,
@Param
(
"ew"
)
Wrapper
<
ibzd
epartment
>
updateWrapper
);
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZDepartment
entity
,
@Param
(
"ew"
)
Wrapper
<
IBZD
epartment
>
updateWrapper
);
@Override
@CacheEvict
(
value
=
"ibzdepartment"
,
key
=
"'row:'+#p0"
)
int
deleteById
(
Serializable
id
);
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZDeptMemberMapper.java
浏览文件 @
d5960556
...
...
@@ -26,7 +26,7 @@ public interface IBZDeptMemberMapper extends BaseMapper<IBZDeptMember>{
int
insert
(
IBZDeptMember
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
IBZDeptMember
entity
);
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZDeptMember
entity
,
@Param
(
"ew"
)
Wrapper
<
ibzdeptm
ember
>
updateWrapper
);
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZDeptMember
entity
,
@Param
(
"ew"
)
Wrapper
<
IBZDeptM
ember
>
updateWrapper
);
@Override
int
deleteById
(
Serializable
id
);
/**
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZEmployeeMapper.java
浏览文件 @
d5960556
...
...
@@ -30,7 +30,7 @@ public interface IBZEmployeeMapper extends BaseMapper<IBZEmployee>{
@CacheEvict
(
value
=
"ibzemployee"
,
key
=
"'row:'+#p0.userid"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
IBZEmployee
entity
);
@CacheEvict
(
value
=
"ibzemployee"
,
key
=
"'row:'+#p0.userid"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZEmployee
entity
,
@Param
(
"ew"
)
Wrapper
<
ibze
mployee
>
updateWrapper
);
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZEmployee
entity
,
@Param
(
"ew"
)
Wrapper
<
IBZE
mployee
>
updateWrapper
);
@Override
@CacheEvict
(
value
=
"ibzemployee"
,
key
=
"'row:'+#p0"
)
int
deleteById
(
Serializable
id
);
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZOrganizationMapper.java
浏览文件 @
d5960556
...
...
@@ -32,7 +32,7 @@ public interface IBZOrganizationMapper extends BaseMapper<IBZOrganization>{
@CacheEvict
(
value
=
"ibzorganization"
,
key
=
"'row:'+#p0.orgid"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
IBZOrganization
entity
);
@CacheEvict
(
value
=
"ibzorganization"
,
key
=
"'row:'+#p0.orgid"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZOrganization
entity
,
@Param
(
"ew"
)
Wrapper
<
ibzo
rganization
>
updateWrapper
);
int
update
(
@Param
(
Constants
.
ENTITY
)
IBZOrganization
entity
,
@Param
(
"ew"
)
Wrapper
<
IBZO
rganization
>
updateWrapper
);
@Override
@CacheEvict
(
value
=
"ibzorganization"
,
key
=
"'row:'+#p0"
)
int
deleteById
(
Serializable
id
);
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZDeptMemberService.java
浏览文件 @
d5960556
...
...
@@ -38,10 +38,8 @@ public interface IIBZDeptMemberService extends IService<IBZDeptMember>{
Page
<
IBZDeptMember
>
searchDefault
(
IBZDeptMemberSearchContext
context
)
;
List
<
IBZDeptMember
>
selectByDeptid
(
String
deptid
)
;
void
removeByDeptid
(
String
deptid
)
;
void
saveByDeptid
(
String
deptid
,
List
<
IBZDeptMember
>
list
)
;
List
<
IBZDeptMember
>
selectByUserid
(
String
userid
)
;
void
removeByUserid
(
String
userid
)
;
void
saveByUserid
(
String
userid
,
List
<
IBZDeptMember
>
list
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
浏览文件 @
d5960556
...
...
@@ -64,7 +64,6 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
ibzdeptmemberService
.
saveByDeptid
(
et
.
getDeptid
(),
et
.
getIbzdeptmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getDeptid
()),
et
);
return
true
;
}
...
...
@@ -84,7 +83,6 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
et
.
setDeptid
(
key
);
}
else
{
et
.
setIbzdeptmember
(
ibzdeptmemberService
.
selectByDeptid
(
key
));
}
return
et
;
}
...
...
@@ -129,7 +127,6 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
ibzdeptmemberService
.
removeByDeptid
(
key
)
;
boolean
result
=
removeById
(
key
);
return
result
;
}
...
...
@@ -145,7 +142,6 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"deptid"
,
et
.
getDeptid
())))
return
false
;
ibzdeptmemberService
.
saveByDeptid
(
et
.
getDeptid
(),
et
.
getIbzdeptmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getDeptid
()),
et
);
return
true
;
}
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZDeptMemberServiceImpl.java
浏览文件 @
d5960556
...
...
@@ -158,35 +158,6 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I
this
.
remove
(
new
QueryWrapper
<
IBZDeptMember
>().
eq
(
"deptid"
,
deptid
));
}
@Override
public
void
saveByDeptid
(
String
deptid
,
List
<
IBZDeptMember
>
list
)
{
if
(
list
==
null
)
return
;
Set
<
String
>
delIds
=
new
HashSet
<
String
>();
List
<
IBZDeptMember
>
_update
=
new
ArrayList
<
IBZDeptMember
>();
List
<
IBZDeptMember
>
_create
=
new
ArrayList
<
IBZDeptMember
>();
for
(
IBZDeptMember
before:
selectByDeptid
(
deptid
)){
delIds
.
add
(
before
.
getMemberid
());
}
for
(
IBZDeptMember
sub:
list
)
{
sub
.
setDeptid
(
deptid
);
if
(
ObjectUtils
.
isEmpty
(
sub
.
getMemberid
()))
sub
.
setMemberid
((
String
)
sub
.
getDefaultKey
(
true
));
if
(
delIds
.
contains
(
sub
.
getMemberid
()))
{
delIds
.
remove
(
sub
.
getMemberid
());
_update
.
add
(
sub
);
}
else
_create
.
add
(
sub
);
}
if
(
_update
.
size
()>
0
)
this
.
updateBatch
(
_update
);
if
(
_create
.
size
()>
0
)
this
.
createBatch
(
_create
);
if
(
delIds
.
size
()>
0
)
this
.
removeBatch
(
delIds
);
}
@Override
public
List
<
IBZDeptMember
>
selectByUserid
(
String
userid
)
{
return
baseMapper
.
selectByUserid
(
userid
);
...
...
@@ -197,35 +168,6 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I
this
.
remove
(
new
QueryWrapper
<
IBZDeptMember
>().
eq
(
"userid"
,
userid
));
}
@Override
public
void
saveByUserid
(
String
userid
,
List
<
IBZDeptMember
>
list
)
{
if
(
list
==
null
)
return
;
Set
<
String
>
delIds
=
new
HashSet
<
String
>();
List
<
IBZDeptMember
>
_update
=
new
ArrayList
<
IBZDeptMember
>();
List
<
IBZDeptMember
>
_create
=
new
ArrayList
<
IBZDeptMember
>();
for
(
IBZDeptMember
before:
selectByUserid
(
userid
)){
delIds
.
add
(
before
.
getMemberid
());
}
for
(
IBZDeptMember
sub:
list
)
{
sub
.
setUserid
(
userid
);
if
(
ObjectUtils
.
isEmpty
(
sub
.
getMemberid
()))
sub
.
setMemberid
((
String
)
sub
.
getDefaultKey
(
true
));
if
(
delIds
.
contains
(
sub
.
getMemberid
()))
{
delIds
.
remove
(
sub
.
getMemberid
());
_update
.
add
(
sub
);
}
else
_create
.
add
(
sub
);
}
if
(
_update
.
size
()>
0
)
this
.
updateBatch
(
_update
);
if
(
_create
.
size
()>
0
)
this
.
createBatch
(
_create
);
if
(
delIds
.
size
()>
0
)
this
.
removeBatch
(
delIds
);
}
/**
* 查询集合 DEFAULT
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
浏览文件 @
d5960556
...
...
@@ -63,7 +63,6 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
ibzdeptmemberService
.
removeByUserid
(
key
)
;
boolean
result
=
removeById
(
key
);
return
result
;
}
...
...
@@ -86,7 +85,6 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
ibzdeptmemberService
.
saveByUserid
(
et
.
getUserid
(),
et
.
getIbzdeptmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getUserid
()),
et
);
savedeptmemberLogic
.
execute
(
et
);
return
true
;
...
...
@@ -109,7 +107,6 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"userid"
,
et
.
getUserid
())))
return
false
;
ibzdeptmemberService
.
saveByUserid
(
et
.
getUserid
(),
et
.
getIbzdeptmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getUserid
()),
et
);
savedeptmemberLogic
.
execute
(
et
);
return
true
;
...
...
@@ -156,7 +153,6 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
et
.
setUserid
(
key
);
}
else
{
et
.
setIbzdeptmember
(
ibzdeptmemberService
.
selectByUserid
(
key
));
}
return
et
;
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录