Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
c9f567fd
Commit
c9f567fd
authored
Oct 30, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派单审核导出问题修改
parent
687570ee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
29 deletions
+4
-29
SysDeptMapper.java
...m/yifu.cloud.plus.v1/yifu/admin/mapper/SysDeptMapper.java
+0
-2
SysDeptServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+0
-9
SysUserServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
+3
-10
SysDeptMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
+1
-8
No files found.
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/mapper/SysDeptMapper.java
View file @
c9f567fd
...
...
@@ -40,8 +40,6 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
*/
List
<
SysDept
>
listDepts
();
List
<
String
>
selectDnList
();
SysDept
selectCountId
(
@Param
(
"deptId"
)
Long
deptId
);
int
updateDeptById
(
@Param
(
"dept"
)
SysDept
dept
);
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
c9f567fd
...
...
@@ -183,15 +183,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
@Override
public
R
<
Boolean
>
updateDeptByLdap
()
{
List
<
SearchResultEntry
>
entryList
=
ldapUtil
.
getAllPersonNamesWithTraditionalWay
();
//获取ldap所有的dn
List
<
String
>
entryDnList
=
entryList
.
stream
().
map
(
SearchResultEntry:
:
getDN
).
collect
(
Collectors
.
toList
());
//获取本地dept表中所有的dn
List
<
String
>
dnList
=
baseMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
if
(!
delList
.
isEmpty
())
{
baseMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
for
(
SearchResultEntry
entry
:
entryList
)
{
String
dn
=
entry
.
getDN
();
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
c9f567fd
...
...
@@ -437,15 +437,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
}
List
<
SearchResultEntry
>
entryList
=
ldapUtil
.
getAllPersonNamesWithTraditionalWay
();
//获取ldap所有的dn
List
<
String
>
entryDnList
=
entryList
.
stream
().
map
(
SearchResultEntry:
:
getDN
).
collect
(
Collectors
.
toList
());
//获取本地dept表中所有的dn
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
if
(!
delList
.
isEmpty
())
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
for
(
SearchResultEntry
entry
:
entryList
)
{
String
dn
=
entry
.
getDN
();
...
...
@@ -474,6 +465,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if
(
Common
.
isNotNull
(
entry
.
getAttributeValue
(
"x-ouid"
)))
{
insertSysDept
.
setDeptId
(
Long
.
valueOf
(
entry
.
getAttributeValue
(
"x-ouid"
)));
}
insertSysDept
.
setDelFlag
(
CommonConstants
.
ZERO_STRING
);
sysDeptMapper
.
insert
(
insertSysDept
);
}
}
...
...
@@ -482,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysDeptMapper
.
updateDeptById
(
sysDept
);
}
}
else
{
SysDept
sysDept
=
sysDeptMapper
.
select
One
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
()
)));
SysDept
sysDept
=
sysDeptMapper
.
select
DeptDn
(
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
(
)));
if
(
null
!=
sysDept
)
{
SysDept
sysDeptCount
=
sysDeptMapper
.
selectDeptDn
(
dn
);
if
(
null
==
sysDeptCount
)
{
...
...
@@ -501,6 +493,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if
(
Common
.
isNotNull
(
entry
.
getAttributeValue
(
"x-ouid"
)))
{
insertSysDept
.
setDeptId
(
Long
.
valueOf
(
entry
.
getAttributeValue
(
"x-ouid"
)));
}
insertSysDept
.
setDelFlag
(
CommonConstants
.
ZERO_STRING
);
sysDeptMapper
.
insert
(
insertSysDept
);
}
}
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
View file @
c9f567fd
...
...
@@ -31,14 +31,6 @@
<result
column=
"del_flag"
property=
"delFlag"
/>
</resultMap>
<!--查询所有dn-->
<select
id=
"selectDnList"
resultType=
"String"
>
SELECT a.dept_dn
FROM sys_dept a
WHERE a.del_flag = 0
AND a.dept_dn IS NOT NULL
</select>
<select
id=
"selectCountId"
resultType=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept"
>
SELECT
*
...
...
@@ -63,6 +55,7 @@
<if
test=
"dept.name != null"
>
name=#{dept.name},
</if>
<if
test=
"dept.parentId != null"
>
parent_id=#{dept.parentId},
</if>
<if
test=
"dept.deptDn != null"
>
dept_dn=#{dept.deptDn},
</if>
del_flag = '0',
update_time = now()
</trim>
WHERE dept_id=#{dept.deptId}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment