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
1ee396ce
Commit
1ee396ce
authored
Apr 18, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店分组绑定校验
parent
77bbc729
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
InfoController.java
.../com/gic/haoban/manage/web/controller/InfoController.java
+31
-10
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/InfoController.java
View file @
1ee396ce
...
...
@@ -195,16 +195,22 @@ public class InfoController extends WebBaseController{
logger
.
info
(
"改企业不存在:{}"
,
qo
.
getGicEnterpriseId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_400002
);
}
SecretSettingDTO
secretSetting
=
wxEnterpriseApiService
.
getSecretSetting
(
enterpriseDetailDTO
.
getWxEnterpriseId
(),
SecretTypeEnum
.
MEMBER_WAPP
.
getVal
(),
qo
.
getGicEnterpriseId
());
if
(
null
==
secretSetting
||
StringUtils
.
isBlank
(
secretSetting
.
getSecretVal
()))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10019
);
}
MemberLoginQo
user
=
new
MemberLoginQo
();
if
(
StringUtils
.
isBlank
(
qo
.
getUserId
()))
{
logger
.
info
(
"corpId============>{},secretVal===============>{},code=================》{}"
,
enterpriseDTO
.
getCorpid
(),
secretSetting
.
getSecretVal
(),
qo
.
getCode
());
String
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
enterpriseDTO
.
getCorpid
(),
secretSetting
.
getSecretVal
(),
qo
.
getCode
());
logger
.
info
(
"会员微信登录信息=============>{}"
,
userDTOJson
);
user
=
JSON
.
parseObject
(
userDTOJson
,
MemberLoginQo
.
class
);
// SecretSettingDTO secretSetting = wxEnterpriseApiService.getSecretSetting(enterpriseDetailDTO.getWxEnterpriseId(), SecretTypeEnum.MEMBER_WAPP.getVal(), qo.getGicEnterpriseId());
// if (null == secretSetting||StringUtils.isBlank(secretSetting.getSecretVal())) {
// return resultResponse(HaoBanErrCode.ERR_10019);
// }
//
// logger.info("corpId============>{},secretVal===============>{},code=================》{}",enterpriseDTO.getCorpid(), secretSetting.getSecretVal(), qo.getCode());
// String userDTOJson = qywxUserApiService.getUserByCode(enterpriseDTO.getCorpid(), secretSetting.getSecretVal(), qo.getCode());
user
=
getUserByCode
(
enterpriseDTO
,
qo
.
getCode
(),
qo
.
getGicEnterpriseId
());
if
(
user
!=
null
&&
(!
user
.
getCorpId
().
equals
(
enterpriseDTO
.
getCorpid
())))
{
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
user
.
getCorpId
());
user
=
getUserByCode
(
enterpriseDTO
,
qo
.
getCode
(),
qo
.
getGicEnterpriseId
());
}
if
(
user
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
}
...
...
@@ -262,8 +268,23 @@ public class InfoController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
user
);
}
@RequestMapping
(
"save-user-login-log"
)
private
MemberLoginQo
getUserByCode
(
WxEnterpriseDTO
enterpriseDTO
,
String
code
,
String
enterpriseId
)
{
SecretSettingDTO
secretSetting
=
wxEnterpriseApiService
.
getSecretSetting
(
enterpriseDTO
.
getWxEnterpriseId
(),
SecretTypeEnum
.
MEMBER_WAPP
.
getVal
(),
enterpriseId
);
if
(
null
==
secretSetting
||
StringUtils
.
isBlank
(
secretSetting
.
getSecretVal
()))
{
logger
.
info
(
"MEMBER_WAPPsecret配置没有配置"
);
return
null
;
}
String
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
enterpriseDTO
.
getCorpid
(),
secretSetting
.
getSecretVal
(),
code
);
logger
.
info
(
"会员微信登录信息=============>{}"
,
userDTOJson
);
MemberLoginQo
user
=
JSON
.
parseObject
(
userDTOJson
,
MemberLoginQo
.
class
);
if
(
user
==
null
)
{
return
null
;
}
return
user
;
}
@RequestMapping
(
"save-user-login-log"
)
public
HaobanResponse
saveUserLoginLog
(
UserLoginLogDTO
userLoginLogDTO
)
{
staffApiService
.
insertUserLoginLog
(
userLoginLogDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
...
...
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