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
cf70cf40
Commit
cf70cf40
authored
Feb 26, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业微信取消授权回调处理
parent
bb92a32f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+19
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
cf70cf40
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -12,14 +18,16 @@ import com.gic.haoban.manage.service.service.StaffService;
@Service
public
class
MemberUnionidRelatedApiServiceImpl
implements
MemberUnionidRelatedApiService
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
MemberUnionidRelatedApiServiceImpl
.
class
);
@Autowired
private
MemberUnionRelatedService
memberUnionRelatedService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
QywxUserApiService
qywxUserApiService
;
@Autowired
private
com
.
gic
.
enterprise
.
api
.
service
.
StoreGroupService
gicDepartmentService
;
@Override
public
MemberUnionidRelatedDTO
getByUnionId
(
String
staffId
,
String
unionid
)
{
TabHaobanStaff
staff
=
staffService
.
selectById
(
staffId
);
...
...
@@ -30,12 +38,21 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
@Override
public
String
addMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
)
{
this
.
getExternalUserUnionid
(
dto
);
return
memberUnionRelatedService
.
addMemberUnionidRelated
(
dto
);
}
@Override
public
void
delMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
)
{
this
.
getExternalUserUnionid
(
dto
);
memberUnionRelatedService
.
delMemberUnionidRelated
(
dto
);
}
private
void
getExternalUserUnionid
(
MemberUnionidRelatedDTO
dto
){
String
externalUseridInfo
=
this
.
qywxUserApiService
.
getExternalUseridInfo
(
dto
.
getCorpid
(),
dto
.
getSuiteid
(),
dto
.
getExternalUserid
());
if
(
StringUtils
.
isNotBlank
(
externalUseridInfo
)){
JSONObject
jsonObject
=
JSON
.
parseObject
(
externalUseridInfo
);
dto
.
setUnionid
(
jsonObject
.
getString
(
"unionid"
));
}
}
}
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