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
2fe39e51
Commit
2fe39e51
authored
Mar 04, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c2857a60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+30
-3
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
2fe39e51
...
...
@@ -265,9 +265,36 @@ public class MessageApiServiceImpl implements MessageApiService {
private
void
addUser
(
QywxCallBackDTO
qywxCallBackDTO
,
TabHaobanStaff
staff
){
String
add
=
this
.
staffService
.
add
(
staff
);
log
.
info
(
"新增用户返回结果:{}"
,
add
);
this
.
addUserDepart
(
qywxCallBackDTO
,
add
,
staff
.
getWxEnterpriseId
());
TabHaobanWxEnterprise
enterprise
=
this
.
enterpriseService
.
getEnterpriseBycorpId
(
qywxCallBackDTO
.
getAuthCorpId
());
StaffDTO
staffDTO
=
staffApiService
.
selectByUserId
(
staff
.
getWxUserId
());
String
[]
departArr
=
qywxCallBackDTO
.
getDepartment
();
String
departmentIds
=
""
;
for
(
String
s
:
departArr
){
TabHaobanDepartment
department
=
this
.
departmentService
.
getByWxId
(
s
,
enterprise
.
getWxEnterpriseId
());
if
(
department
==
null
){
log
.
info
(
"部门不存在"
);
continue
;
}
departmentIds
+=
department
.
getDepartmentId
()
+
","
;
}
departmentIds
=
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
);
if
(
staffDTO
==
null
){
staffApiService
.
add
(
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
),
departmentIds
);
}
else
{
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listStaffDepartmentByStaffId
(
staff
.
getStaffId
());
for
(
TabHaobanStaffDepartmentRelated
tabHaobanStaffDepartmentRelated
:
list
)
{
if
(!
departmentIds
.
contains
(
tabHaobanStaffDepartmentRelated
.
getDepartmentId
())){
departmentIds
+=
tabHaobanStaffDepartmentRelated
.
getDepartmentId
()
+
","
;
}
if
(
departmentIds
.
endsWith
(
","
)){
departmentIds
=
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
);
}
}
staffApiService
.
staffEdit
(
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
),
departmentIds
);
}
// String add = this.staffService.add(staff);
// log.info("新增用户返回结果:{}", add);
// this.addUserDepart(qywxCallBackDTO, add, staff.getWxEnterpriseId());
}
private
void
addUserDepart
(
QywxCallBackDTO
qywxCallBackDTO
,
String
staffId
,
String
wxEnterpriseId
){
...
...
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