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
79ee9708
Commit
79ee9708
authored
Aug 19, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
3aafb1e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+13
-19
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
79ee9708
...
...
@@ -320,38 +320,32 @@ public class WxEnterpriseInfoController extends WebBaseController {
public
HaobanResponse
getInfoByMemberCode
(
GetUserByMemberCodeQo
qo
)
{
logger
.
info
(
"会员小程序={}"
,
JSON
.
toJSONString
(
qo
));
String
gicEnterpriseId
=
qo
.
getGicEnterpriseId
();
WxEnterpriseDTO
enterpriseD
etailD
TO
=
null
;
WxEnterpriseDTO
enterpriseDTO
=
null
;
if
(
StringUtils
.
isNotBlank
(
qo
.
getCorpId
()))
{
enterpriseDetailDTO
=
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
qo
.
getCorpId
());
if
(
null
==
enterpriseDetailDTO
)
{
logger
.
info
(
"企微查不到,corpid={}"
,
qo
.
getCorpId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_500001
);
}
enterpriseDTO
=
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
qo
.
getCorpId
());
}
else
{
List
<
WxEnterpriseDTO
>
wxEnterpriseDTOS
=
wxEnterpriseRelatedApiService
.
listWxEnterpriseByEid
(
gicEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
wxEnterpriseDTOS
))
{
logger
.
info
(
"商户没有关联企微,eid={}"
,
gicEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_500001
);
if
(
CollectionUtils
.
isNotEmpty
(
wxEnterpriseDTOS
))
{
enterpriseDTO
=
wxEnterpriseDTOS
.
get
(
0
);
}
enterpriseDetailDTO
=
wxEnterpriseDTOS
.
get
(
0
);
}
String
wxEnterpriseId
=
enterpriseDetailDTO
.
getWxEnterpriseId
();
logger
.
info
(
"查询到的企微ID={}"
,
wxEnterpriseId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
enterpriseDTO
==
null
)
{
logger
.
info
(
"该企业不存在wxEnterpriseId={}"
,
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_400002
);
if
(
null
==
enterpriseDTO
)
{
logger
.
info
(
"企微查不到,corpid={}"
,
qo
.
getCorpId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_500001
);
}
String
wxEnterpriseId
=
enterpriseDTO
.
getWxEnterpriseId
();
logger
.
info
(
"查询到的企微ID={}"
,
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
)
;
MemberLoginQo
user
=
new
MemberLoginQo
();
if
(
StringUtils
.
isBlank
(
qo
.
getUserId
()))
{
user
=
getUserByCode
(
wxEnterpriseId
,
qwDTO
.
getThirdCorpid
()
,
qo
.
getCode
(),
qo
.
getGicEnterpriseId
());
user
=
getUserByCode
(
wxEnterpriseId
,
qwDTO
.
getThirdCorpid
()
,
qo
.
getCode
(),
qo
.
getGicEnterpriseId
());
if
(
user
==
null
)
{
logger
.
info
(
"登录失败,从微信获取用户信息失败"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
}
if
(!
user
.
getCorpId
().
equals
(
enterpriseDTO
.
getCorpid
())
&&
!
user
.
getCorpId
().
equals
(
enterpriseD
etailD
TO
.
getOpenCorpid
()))
{
logger
.
info
(
"corpid不一致
"
);
if
(!
user
.
getCorpId
().
equals
(
enterpriseDTO
.
getCorpid
())
&&
!
user
.
getCorpId
().
equals
(
enterpriseDTO
.
getOpenCorpid
()))
{
logger
.
info
(
"corpid不一致
,{},{},{}"
,
user
.
getCorpId
(),
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getOpenCorpid
()
);
return
resultResponse
(
HaoBanErrCode
.
ERR_500003
,
user
.
getCorpId
());
}
WxApplicationDTO
wxApplicationDTO
=
wxApplicationApiService
.
selectByCorpid
(
user
.
getCorpId
());
...
...
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