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
b3f21726
Commit
b3f21726
authored
Aug 11, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corpid
parent
e6cd7d51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
WxEnterpriseQwDTO.java
...java/com/gic/haoban/manage/api/dto/WxEnterpriseQwDTO.java
+9
-0
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+5
-0
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+6
-3
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseQwDTO.java
View file @
b3f21726
...
...
@@ -16,12 +16,21 @@ public class WxEnterpriseQwDTO implements Serializable {
private
String
memberSuiteId
;
// 第三方
private
String
thirdCorpid
;
// 明文的corpid
private
String
selfCorpid
;
// 第三方使用的加密的userid
public
boolean
needOpenUserId3th
()
{
return
this
.
wxSecurityType
==
2
||
this
.
wxSecurityType
==
3
;
}
public
String
getSelfCorpid
()
{
return
selfCorpid
;
}
public
void
setSelfCorpid
(
String
selfCorpid
)
{
this
.
selfCorpid
=
selfCorpid
;
}
public
String
getDkSuiteId
()
{
return
dkSuiteId
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
b3f21726
...
...
@@ -77,6 +77,11 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
}
});
}
if
(
StringUtils
.
isBlank
(
qw
.
getMemberCorpid
()))
{
logger
.
info
(
"会员小程序是自建"
);
qw
.
setMemberCorpid
(
wxEnterprise
.
getWxCorpid
());
}
qw
.
setSelfCorpid
(
wxEnterprise
.
getWxCorpid
());
logger
.
info
(
"企微所有corpid信息={}"
,
JSON
.
toJSON
(
qw
));
return
qw
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
b3f21726
...
...
@@ -325,7 +325,7 @@ public class WxEnterpriseController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_10012
);
}
wxSecretKey
=
wxSecretKey
.
trim
();
String
res
=
qywxUserApiService
.
listSelfExternalUserid
(
qwDTO
.
getDkCorpid
(),
wxSecretKey
,
getWxUserId
(
wxEnterpriseId
,
login
.
getStaffId
(),
qwDTO
));
String
res
=
qywxUserApiService
.
listSelfExternalUserid
(
qwDTO
.
getDkCorpid
(),
wxSecretKey
,
getWxUserId
(
wxEnterpriseId
,
login
.
getStaffId
(),
qwDTO
,
true
));
logger
.
info
(
"【保存联系人key】res={}"
,
res
);
SecretSettingDTO
secretSetting
=
wxEnterpriseApiService
.
getSecretSetting
(
wxEnterpriseId
,
SecretTypeEnum
.
CONTACT_CUSTOMER
.
getVal
(),
null
);
if
(
null
==
secretSetting
)
{
...
...
@@ -367,7 +367,7 @@ public class WxEnterpriseController extends WebBaseController {
secretSetting
=
new
SecretSettingDTO
();
}
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
)
;
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
qwDTO
.
getMemberCorpid
(),
memberSecret
,
getWxUserId
(
wxEnterpriseId
,
login
.
getStaffId
(),
qwDTO
));
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
qwDTO
.
getMemberCorpid
(),
memberSecret
,
getWxUserId
(
wxEnterpriseId
,
login
.
getStaffId
(),
qwDTO
,
false
));
secretSetting
.
setSecretType
(
SecretTypeEnum
.
MEMBER_WAPP
.
getVal
());
secretSetting
.
setSecretName
(
secretName
);
secretSetting
.
setEnterpriseId
(
enterpriseId
);
...
...
@@ -385,7 +385,7 @@ public class WxEnterpriseController extends WebBaseController {
}
}
private
String
getWxUserId
(
String
wxEnterpriseId
,
String
staffId
,
WxEnterpriseQwDTO
qwDTO
)
{
private
String
getWxUserId
(
String
wxEnterpriseId
,
String
staffId
,
WxEnterpriseQwDTO
qwDTO
,
boolean
selfFlag
)
{
StaffDTO
statff
=
null
;
if
(
StringUtils
.
isBlank
(
staffId
))
{
statff
=
this
.
staffApiService
.
getWxStaffOne
(
wxEnterpriseId
)
;
...
...
@@ -396,6 +396,9 @@ public class WxEnterpriseController extends WebBaseController {
if
(
null
==
statff
)
{
return
null
;
}
if
(
selfFlag
)
{
return
statff
.
getWxUserId
();
}
if
(
qwDTO
.
needOpenUserId3th
())
{
return
statff
.
getWxOpenUseId
()
;
}
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