Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhuyifan
2025-03-03 16:33:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eaa9c8001bb51c76b7848d6e521ef4e717aa5616
eaa9c800
1 parent
dbfda5e6
fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
src/main/java/com/infoloop/tianting/intercepter/LoginInterceptor.java
src/main/java/com/infoloop/tianting/intercepter/LoginInterceptor.java
View file @
eaa9c80
...
...
@@ -67,6 +67,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
StpUtil
.
checkLogin
();
final
var
enterpriseId
=
Convert
.
toInt
(
StpUtil
.
getExtra
(
CommonConstants
.
ENTERPRISE_ID
));
final
var
loginSource
=
Convert
.
toInt
(
StpUtil
.
getExtra
(
CommonConstants
.
LOGIN_SOURCE
));
log
.
info
(
"Login success, enterpriseId: {}, loginSource: {}"
,
enterpriseId
,
loginSource
);
if
(
loginSource
.
equals
(
LoginSourceEnum
.
CUSTOMER
.
getValue
()))
{
final
var
openId
=
Convert
.
toStr
(
StpUtil
.
getExtra
(
CommonConstants
.
OPEN_ID
));
final
var
loginId
=
StpUtil
.
getLoginIdAsInt
();
...
...
@@ -76,6 +77,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
ResponseUtil
.
write
(
response
,
ResponseResult
.
failed
(
ErrorCodeEnum
.
VALIDATE_FAILED
));
return
false
;
}
log
.
info
(
"Customer login success, customerId: {}, enterpriseId: {}, openId:{}"
,
loginId
,
enterpriseId
,
openId
);
builder
.
id
(
loginId
).
enterpriseId
(
enterpriseId
).
name
(
customer
.
getResponse
().
getName
()).
openId
(
openId
);
return
true
;
}
else
if
(
loginSource
.
equals
(
LoginSourceEnum
.
OPERATOR
.
getValue
())){
...
...
Please
register
or
login
to post a comment