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
3f5a34dd
Commit
3f5a34dd
authored
Apr 20, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自建
parent
004f9adb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+5
-5
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
3f5a34dd
...
@@ -156,7 +156,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -156,7 +156,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
}
}
if
(
null
!=
wxEnterpriseId
)
{
if
(
null
!=
wxEnterpriseId
)
{
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
)
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
)
;
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
code
);
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
code
,
qwDTO
.
getUrlHost
()
);
}
else
{
}
else
{
userDTOJson
=
qywxCorpApiService
.
getCodeSession
(
config
.
getWxSuiteid
(),
code
);
userDTOJson
=
qywxCorpApiService
.
getCodeSession
(
config
.
getWxSuiteid
(),
code
);
}
}
...
@@ -394,7 +394,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -394,7 +394,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
);
MemberLoginQo
user
=
new
MemberLoginQo
();
MemberLoginQo
user
=
new
MemberLoginQo
();
if
(
StringUtils
.
isBlank
(
qo
.
getUserId
()))
{
if
(
StringUtils
.
isBlank
(
qo
.
getUserId
()))
{
user
=
getUserByCode
(
wxEnterpriseId
,
qwDTO
.
getMemberCorpid
(),
qo
.
getCode
(),
qo
.
getGicEnterpriseId
());
user
=
getUserByCode
(
wxEnterpriseId
,
qwDTO
.
getMemberCorpid
(),
qo
.
getCode
(),
qo
.
getGicEnterpriseId
()
,
qwDTO
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
logger
.
info
(
"登录失败,从微信获取用户信息失败"
);
logger
.
info
(
"登录失败,从微信获取用户信息失败"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
...
@@ -463,13 +463,13 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -463,13 +463,13 @@ public class WxEnterpriseInfoController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
user
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
user
);
}
}
private
MemberLoginQo
getUserByCode
(
String
wxEnterpriseId
,
String
corpid
,
String
code
,
String
enterpriseId
)
{
private
MemberLoginQo
getUserByCode
(
String
wxEnterpriseId
,
String
corpid
,
String
code
,
String
enterpriseId
,
WxEnterpriseQwDTO
qwDTO
)
{
SecretSettingDTO
secretSetting
=
wxEnterpriseApiService
.
getSecretSetting
(
wxEnterpriseId
,
SecretTypeEnum
.
MEMBER_WAPP
.
getVal
(),
enterpriseId
);
SecretSettingDTO
secretSetting
=
wxEnterpriseApiService
.
getSecretSetting
(
wxEnterpriseId
,
SecretTypeEnum
.
CONTACT_CUSTOMER
.
getVal
(),
enterpriseId
);
if
(
null
==
secretSetting
||
StringUtils
.
isBlank
(
secretSetting
.
getSecretVal
()))
{
if
(
null
==
secretSetting
||
StringUtils
.
isBlank
(
secretSetting
.
getSecretVal
()))
{
logger
.
info
(
"MEMBER_WAPPsecret没有配置{},{}"
,
wxEnterpriseId
,
enterpriseId
);
logger
.
info
(
"MEMBER_WAPPsecret没有配置{},{}"
,
wxEnterpriseId
,
enterpriseId
);
return
null
;
return
null
;
}
}
String
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
corpid
,
secretSetting
.
getSecretVal
(),
code
);
String
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
corpid
,
secretSetting
.
getSecretVal
(),
code
,
qwDTO
.
getUrlHost
()
);
logger
.
info
(
"会员微信登录信息=============>{}"
,
userDTOJson
);
logger
.
info
(
"会员微信登录信息=============>{}"
,
userDTOJson
);
return
JSON
.
parseObject
(
userDTOJson
,
MemberLoginQo
.
class
);
return
JSON
.
parseObject
(
userDTOJson
,
MemberLoginQo
.
class
);
}
}
...
...
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