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
05c0c4ca
Commit
05c0c4ca
authored
Apr 12, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自建加好友
parent
cc4c1952
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+32
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
05c0c4ca
...
...
@@ -1124,6 +1124,38 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
suiteid
=
dto
.
getSuiteid
();
String
externalUserid
=
dto
.
getExternalUserid
();
ExternalUserDTO
externalUserDTO
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
String
unionIdJson
=
qywxUserApiService
.
getCorpSelfExternalUseridInfo
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
dto
.
getExternalUserid
());
if
(
StringUtils
.
isBlank
(
unionIdJson
))
{
log
.
info
(
"好友不存在"
);
return
null
;
}
else
if
(
"1"
.
equals
(
unionIdJson
))
{
log
.
info
(
"接口调用被限制"
);
throw
new
WxApiLimitException
(
"getCorpSelfExternalUseridInfo接口调用被限制"
);
}
ExternalUserPojo
pojo
=
getExternalUserPojo
(
unionIdJson
,
wxUserId
,
wxEnterpriseId
);
externalUserDTO
=
EntityUtil
.
changeEntityByJSON
(
ExternalUserDTO
.
class
,
pojo
);
if
(
externalUserDTO
==
null
)
{
log
.
info
(
"【新增外部联系人】查询好友失败,externalUserid={}"
,
externalUserid
);
return
null
;
}
if
(
null
!=
externalUserDTO
.
getFriendType
()
&&
2
==
externalUserDTO
.
getFriendType
())
{
log
.
info
(
"【新增外部联系人】忽略-2表示该外部联系人是企业微信用户,externalUserid={}"
,
externalUserid
);
return
null
;
}
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setExternalName
(
EmojiFilterUtil
.
removeAllEmoji
(
externalUserDTO
.
getName
()));
dto
.
setAddCreateTime
(
externalUserDTO
.
getAddCreateTime
());
if
(
StringUtils
.
isNotEmpty
(
externalUserDTO
.
getAvatar
()))
{
dto
.
setAvatar
(
externalUserDTO
.
getAvatar
());
}
if
(
StringUtils
.
isNoneBlank
(
externalUserDTO
.
getUnionId
()))
{
dto
.
setUnionid
(
externalUserDTO
.
getUnionId
());
}
return
dto
;
}
if
(
SELF_APP
.
equals
(
suiteid
))
{
externalUserDTO
=
this
.
getCorpSelfExternalUseridInfo
(
wxEnterpriseId
,
wxUserId
,
externalUserid
);
}
else
{
...
...
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