Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
0d07878e
Commit
0d07878e
authored
Jan 31, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无效代码
parent
ce897228
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
66 deletions
+0
-66
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+0
-66
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
0d07878e
...
...
@@ -472,17 +472,6 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staffDTO
;
}
// @Override
// public StaffDepartmentRelatedDTO getDepartmentIdAndStaffId(String departmentId, String staffId) {
// TabHaobanStaffDepartmentRelated tab = staffDepartmentRelatedService.getDepartmentIdAndStaffId(departmentId, staffId);
// return EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, tab);
// }
// @Override
// public StaffDepartmentRelatedDTO getDepartmentIdAndCode(String departmentId, String code) {
// return EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, staffDepartmentRelatedMapper.getDepartmentIdAndCode(departmentId, code));
// }
@Override
public
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
,
String
taskId
)
{
List
<
UserDTO
>
list
=
this
.
qywxUserApiService
.
listSelfDepartmentUser
(
corpid
,
contactSecret
,
wxDepartmentId
.
toString
(),
0
);
...
...
@@ -666,47 +655,6 @@ public class StaffApiServiceImpl implements StaffApiService {
return
PageUtil
.
changePageHelperToCurrentPage
(
new
PageInfo
<>(
tabHaobanStaffs
),
StaffDTO
.
class
);
}
// @Override
// public List<StaffDTO> listAllStaffByWxEnterpriseId(String wxEnterpriseId) {
// List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listByWxEnterpriseId(wxEnterpriseId);
// return EntityUtil.changeEntityListNew(StaffDTO.class, tabHaobanStaffs);
// }
// @Override
// public List<StaffDTO> listByOpenUserIdsAndWxEnterpriseId(List<String> openUserIds, String wxEnterpriseId) {
// List<StaffDTO> list = staffService.listByOpenUserIdsAndWxEnterpriseId(openUserIds, wxEnterpriseId);
// if (CollectionUtils.isEmpty(list)) {
// return Collections.EMPTY_LIST;
// }
// this.addDepartInfo(list);
// return list;
// }
private
void
addDepartInfo
(
List
<
StaffDTO
>
list
)
{
List
<
String
>
staffIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getStaffId
()).
collect
(
Collectors
.
toList
());
List
<
TabHaobanStaffDepartmentRelated
>
deplist
=
staffDepartmentRelatedMapper
.
listStaffDepartmentByStaffIds
(
staffIdList
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
Map
<
String
,
List
<
TabHaobanStaffDepartmentRelated
>>
map
=
deplist
.
stream
().
collect
(
Collectors
.
groupingBy
(
TabHaobanStaffDepartmentRelated:
:
getStaffId
));
List
<
String
>
depIdList
=
deplist
.
stream
().
map
(
dto
->
dto
.
getDepartmentId
()).
collect
(
Collectors
.
toList
());
List
<
DepartmentDTO
>
departmentList
=
this
.
departmentService
.
listByIds
(
depIdList
);
Map
<
String
,
DepartmentDTO
>
depMap
=
departmentList
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentDTO:
:
getDepartmentId
,
dto
->
dto
,
(
k1
,
k2
)
->
k1
));
for
(
StaffDTO
dto
:
list
)
{
String
staffId
=
dto
.
getStaffId
();
List
<
TabHaobanStaffDepartmentRelated
>
relateList
=
map
.
get
(
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
relateList
))
{
List
<
DepartmentDTO
>
staffDepList
=
new
ArrayList
<>();
for
(
TabHaobanStaffDepartmentRelated
item
:
relateList
)
{
if
(
null
!=
depMap
.
get
(
item
.
getDepartmentId
()))
{
staffDepList
.
add
(
depMap
.
get
(
item
.
getDepartmentId
()));
}
}
dto
.
setDepartmentList
(
staffDepList
);
}
}
}
}
@Override
public
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
)
{
return
staffService
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
...
...
@@ -773,20 +721,6 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
StringUtils
.
isNotBlank
(
qrCode
))
{
return
staffQrCodeDTO
;
}
//获取微信信息
String
wxUserId
=
staff
.
getWxUserId
();
if
(
qwDTO
.
needOpenUserIdDk
())
{
wxUserId
=
staff
.
getWxOpenUseId
();
}
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
qwDTO
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
wxUserId
);
if
(
null
==
user
)
{
logger
.
info
(
"企业微信用户不存在:wxEnterpriseId:{}:wxUserId:{}"
,
wxEnterpriseId
,
wxUserId
);
return
staffQrCodeDTO
;
}
String
qr_code
=
user
.
getQr_code
();
staffMapper
.
updateQrCodeByStaffId
(
staffId
,
qr_code
);
staffQrCodeDTO
.
setQrCode
(
qr_code
);
return
staffQrCodeDTO
;
}
...
...
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