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
631045b4
Commit
631045b4
authored
Jul 18, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录
parent
56d1e5bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+11
-6
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
631045b4
...
@@ -183,7 +183,7 @@ public class LoginController extends WebBaseController {
...
@@ -183,7 +183,7 @@ public class LoginController extends WebBaseController {
}
}
logger
.
info
(
"登录商户={}"
,
gicEnterpriseId
);
logger
.
info
(
"登录商户={}"
,
gicEnterpriseId
);
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
null
,
null
,
null
);
null
,
null
,
null
,
null
);
if
(
StringUtils
.
isNotBlank
(
code
))
{
if
(
StringUtils
.
isNotBlank
(
code
))
{
try
{
try
{
response
.
sendRedirect
(
host
+
"/haoban-3/#/gic-error?errorCode="
+
code
);
response
.
sendRedirect
(
host
+
"/haoban-3/#/gic-error?errorCode="
+
code
);
...
@@ -220,7 +220,7 @@ public class LoginController extends WebBaseController {
...
@@ -220,7 +220,7 @@ public class LoginController extends WebBaseController {
return
this
.
fail
(
"商户超管的手机号未配置"
);
return
this
.
fail
(
"商户超管的手机号未配置"
);
}
}
//运维单点登录信息:operationUserId userName : 运维realName
//运维单点登录信息:operationUserId userName : 运维realName
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
gicSuperPhone
,
"yw"
,
response
,
operationUserId
,
userName
,
userMobile
);
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
gicSuperPhone
,
"yw"
,
response
,
operationUserId
,
userName
,
userMobile
,
null
);
if
(
StringUtils
.
isNotBlank
(
code
))
{
if
(
StringUtils
.
isNotBlank
(
code
))
{
return
this
.
fail
(
this
.
errMessage
(
code
));
return
this
.
fail
(
this
.
errMessage
(
code
));
}
}
...
@@ -232,7 +232,7 @@ public class LoginController extends WebBaseController {
...
@@ -232,7 +232,7 @@ public class LoginController extends WebBaseController {
*/
*/
@IgnoreLogin
@IgnoreLogin
@RequestMapping
(
"gic-login"
)
@RequestMapping
(
"gic-login"
)
public
ModelAndView
gicLogin
(
String
random
,
String
wxEnterpriseId
,
HttpServletResponse
response
)
{
public
ModelAndView
gicLogin
(
String
random
,
String
wxEnterpriseId
,
HttpServletResponse
response
,
String
hbPage
)
{
// 判断是否存在random
// 判断是否存在random
AES
aes
=
SecureUtil
.
aes
(
LOGIN_KEY
.
getBytes
());
AES
aes
=
SecureUtil
.
aes
(
LOGIN_KEY
.
getBytes
());
String
o
=
aes
.
decryptStr
(
random
);
String
o
=
aes
.
decryptStr
(
random
);
...
@@ -288,7 +288,7 @@ public class LoginController extends WebBaseController {
...
@@ -288,7 +288,7 @@ public class LoginController extends WebBaseController {
String
userMobile
=
jsonObject
.
getString
(
"userMobile"
);
String
userMobile
=
jsonObject
.
getString
(
"userMobile"
);
String
errorCode
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
String
errorCode
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
operationUserId
,
userName
,
userMobile
);
operationUserId
,
userName
,
userMobile
,
hbPage
);
if
(
StringUtils
.
isNotBlank
(
errorCode
))
{
if
(
StringUtils
.
isNotBlank
(
errorCode
))
{
ModelAndView
model
=
new
ModelAndView
(
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error?errorCode="
+
errorCode
,
false
,
false
));
new
RedirectView
(
"/haoban-3/#/gic-error?errorCode="
+
errorCode
,
false
,
false
));
...
@@ -324,7 +324,7 @@ public class LoginController extends WebBaseController {
...
@@ -324,7 +324,7 @@ public class LoginController extends WebBaseController {
// 登录逻辑
// 登录逻辑
private
String
doLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
loginPhoneNumber
,
String
loginChannel
,
private
String
doLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
loginPhoneNumber
,
String
loginChannel
,
HttpServletResponse
response
,
String
operationUserId
,
String
userName
,
String
userMobile
)
{
HttpServletResponse
response
,
String
operationUserId
,
String
userName
,
String
userMobile
,
String
hbPage
)
{
//运维单点登录信息:operationUserId userName : 运维realName
//运维单点登录信息:operationUserId userName : 运维realName
logger
.
info
(
"doLogin={},{},{},{},{}"
,
gicEnterpriseId
,
loginPhoneNumber
,
operationUserId
,
userName
,
userMobile
);
logger
.
info
(
"doLogin={},{},{},{},{}"
,
gicEnterpriseId
,
loginPhoneNumber
,
operationUserId
,
userName
,
userMobile
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
...
@@ -383,7 +383,12 @@ public class LoginController extends WebBaseController {
...
@@ -383,7 +383,12 @@ public class LoginController extends WebBaseController {
webLoginDTO
.
setOperationUserId
(
operationUserId
);
webLoginDTO
.
setOperationUserId
(
operationUserId
);
webLoginDTO
.
setOperationUserName
(
userName
);
webLoginDTO
.
setOperationUserName
(
userName
);
webLoginDTO
.
setClerkPhone
(
userMobile
);
webLoginDTO
.
setClerkPhone
(
userMobile
);
String
redirectUri
=
config
.
getHost
()
+
"index"
;
String
redirectUri
=
config
.
getHost
()
;
if
(
StringUtils
.
isNotBlank
(
hbPage
))
{
redirectUri
+=
hbPage
;
}
else
{
redirectUri
+=
"index"
;
}
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
String
token
=
ToolUtil
.
randomUUID
()
+
"-"
+
ToolUtil
.
randomStringByTime
();
String
token
=
ToolUtil
.
randomUUID
()
+
"-"
+
ToolUtil
.
randomStringByTime
();
AuthWebRequestUtil
.
setSessionUser
(
webLoginDTO
);
AuthWebRequestUtil
.
setSessionUser
(
webLoginDTO
);
...
...
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