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
4e8571c6
Commit
4e8571c6
authored
Aug 12, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通讯录
parent
94cddc37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+12
-10
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
4e8571c6
...
...
@@ -209,11 +209,10 @@ public class StaffApiServiceImpl implements StaffApiService {
return
res
;
}
UserDTO
user
=
null
;
WxEnterpriseQwDTO
wxInfo
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
if
(
wxInfo
.
getWxSecurityType
()==
4
)
{
if
(
qwDTO
.
getWxSecurityType
()==
4
)
{
user
=
qywxUserApiService
.
getWorkWxUser
(
corpid
,
config
.
getWxSuiteid
(),
userId
);
logger
.
info
(
"成员详情(第三方)={}"
,
JSON
.
toJSONString
(
user
))
;
UserDTO
userSelf
=
qywxUserApiService
.
getSelfWorkWxUser
(
wxInfo
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
user
.
getOpen_userid
());
UserDTO
userSelf
=
qywxUserApiService
.
getSelfWorkWxUser
(
qwDTO
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
user
.
getOpen_userid
());
logger
.
info
(
"成员详情(代开)={}"
,
JSON
.
toJSONString
(
user
))
;
if
(
user
!=
null
&&
userSelf
!=
null
)
{
user
.
setName
(
userSelf
.
getName
());
...
...
@@ -244,7 +243,7 @@ public class StaffApiServiceImpl implements StaffApiService {
}
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
.
setWxUserId
(
userId
);
String
openUserid
=
getOpenUserid
(
userId
,
corpid
);
String
openUserid
=
getOpenUserid
(
userId
,
corpid
,
qwDTO
);
if
(
StringUtils
.
isNotBlank
(
openUserid
))
{
staff
.
setWxOpenUseId
(
openUserid
);
}
...
...
@@ -280,7 +279,7 @@ public class StaffApiServiceImpl implements StaffApiService {
}
else
{
staffService
.
updateByPrimaryKey
(
staff
);
}
logger
.
info
(
"
门店
变更保存:{}"
,
JSONObject
.
toJSONString
(
user
));
logger
.
info
(
"
staff
变更保存:{}"
,
JSONObject
.
toJSONString
(
user
));
staffDepartChange
(
staff
,
wxEnterpriseId
,
user
);
// 返回结果带上员工姓名
res
.
setResult
(
staff
.
getStaffName
());
...
...
@@ -294,13 +293,16 @@ public class StaffApiServiceImpl implements StaffApiService {
* @param corpid
* @return
*/
private
String
getOpenUserid
(
String
userId
,
String
corpid
)
{
TabHaobanWxApplication
tabHaobanWxApplication
=
wxApplicationService
.
selectByCorpId
(
corpid
);
List
<
QywxNewUseridDTO
>
qywxNewUseridDTOS
=
qywxUserApiService
.
useridToOpenuserid
(
corpid
,
tabHaobanWxApplication
.
getSiteId
(),
Collections
.
singletonList
(
userId
));
if
(
CollectionUtils
.
isEmpty
(
qywxNewUseridDTOS
))
{
private
String
getOpenUserid
(
String
userId
,
String
corpid
,
WxEnterpriseQwDTO
qwDTO
)
{
if
(
qwDTO
.
getWxSecurityType
()==
2
)
{
return
userId
;
}
List
<
QywxNewUseridDTO
>
list
=
qywxUserApiService
.
useridToOpenuserid
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
Collections
.
singletonList
(
userId
));
logger
.
info
(
"明文userId转密文={}"
,
userId
,
JSON
.
toJSONString
(
list
));
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
""
;
}
return
qywxNewUseridDTOS
.
get
(
0
).
getOpen_userid
();
return
list
.
get
(
0
).
getOpen_userid
();
}
private
String
[]
getNationCodeAndPhoneNumber
(
String
phoneNumber
)
{
...
...
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