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
c09129b9
Commit
c09129b9
authored
Jul 18, 2022
by
guojx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运维登录人手机号
parent
c5210cb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+2
-1
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+12
-8
WebLoginVO.java
...rc/main/java/com/gic/haoban/manage/web/vo/WebLoginVO.java
+14
-0
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
c09129b9
...
...
@@ -406,7 +406,8 @@ public class EnterpriseController extends WebBaseController {
AuthcenterUserDetails
loginUser
=
(
AuthcenterUserDetails
)
SessionContextUtil
.
getUser
(
request
)
;
String
operationUserId
=
String
.
valueOf
(
loginUser
.
getId
());
//运维信息参数
String
operationInfo
=
"&operationUserId="
+
operationUserId
+
"&userName="
+
URLEncoder
.
encode
(
loginUser
.
getRealName
(),
"UTF-8"
);
String
operationInfo
=
"&operationUserId="
+
operationUserId
+
"&userName="
+
URLEncoder
.
encode
(
loginUser
.
getRealName
(),
"UTF-8"
)
+
"&userMobile="
+
loginUser
.
getUserMobile
();
String
random
=
"ywLogin:"
+
UuidUtil
.
randomUUID
();
RedisUtil
.
setCache
(
random
,
1
,
10L
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
c09129b9
...
...
@@ -182,7 +182,8 @@ public class LoginController extends WebBaseController {
}
}
logger
.
info
(
"登录商户={}"
,
gicEnterpriseId
);
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
null
,
null
);
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
null
,
null
,
null
);
if
(
StringUtils
.
isNotBlank
(
code
))
{
try
{
response
.
sendRedirect
(
host
+
"/haoban-3/#/gic-error?errorCode="
+
code
);
...
...
@@ -201,7 +202,7 @@ public class LoginController extends WebBaseController {
@IgnoreLogin
@RequestMapping
(
"yw-login"
)
public
HaobanResponse
ywLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
random
,
HttpServletResponse
response
,
String
operationUserId
,
String
userName
)
throws
UnsupportedEncodingException
{
HttpServletResponse
response
,
String
operationUserId
,
String
userName
,
String
userMobile
)
throws
UnsupportedEncodingException
{
// 判断是否存在random
Object
o
=
RedisUtil
.
getCache
(
random
);
if
(
o
==
null
)
{
...
...
@@ -214,12 +215,12 @@ public class LoginController extends WebBaseController {
if
(
StringUtils
.
isNotBlank
(
userName
))
{
userName
=
URLDecoder
.
decode
(
userName
,
"UTF-8"
);
}
logger
.
info
(
"好办运维登录商户id={},超管手机={},运维信息:{}-{}
"
,
gicEnterpriseId
,
gicSuperPhone
,
operationUserId
,
userNam
e
);
logger
.
info
(
"好办运维登录商户id={},超管手机={},运维信息:{}-{}
-{}"
,
gicEnterpriseId
,
gicSuperPhone
,
operationUserId
,
userName
,
userMobil
e
);
if
(
StringUtils
.
isBlank
(
gicSuperPhone
))
{
return
this
.
fail
(
"商户超管的手机号未配置"
);
}
//运维单点登录信息:operationUserId userName : 运维realName
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
gicSuperPhone
,
"yw"
,
response
,
operationUserId
,
userName
);
String
code
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
gicSuperPhone
,
"yw"
,
response
,
operationUserId
,
userName
,
userMobile
);
if
(
StringUtils
.
isNotBlank
(
code
))
{
return
this
.
fail
(
this
.
errMessage
(
code
));
}
...
...
@@ -284,8 +285,10 @@ public class LoginController extends WebBaseController {
//运维登录信息
String
operationUserId
=
jsonObject
.
getString
(
"operationUserId"
);
String
userName
=
jsonObject
.
getString
(
"userName"
);
String
userMobile
=
jsonObject
.
getString
(
"userMobile"
);
String
errorCode
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
operationUserId
,
userName
);
String
errorCode
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
loginPhoneNumber
,
"gic"
,
response
,
operationUserId
,
userName
,
userMobile
);
if
(
StringUtils
.
isNotBlank
(
errorCode
))
{
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error?errorCode="
+
errorCode
,
false
,
false
));
...
...
@@ -321,9 +324,9 @@ public class LoginController extends WebBaseController {
// 登录逻辑
private
String
doLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
loginPhoneNumber
,
String
loginChannel
,
HttpServletResponse
response
,
String
operationUserId
,
String
userName
)
{
HttpServletResponse
response
,
String
operationUserId
,
String
userName
,
String
userMobile
)
{
//运维单点登录信息:operationUserId userName : 运维realName
logger
.
info
(
"doLogin={},{},{},{}
"
,
gicEnterpriseId
,
loginPhoneNumber
,
operationUserId
,
userNam
e
);
logger
.
info
(
"doLogin={},{},{},{}
,{}"
,
gicEnterpriseId
,
loginPhoneNumber
,
operationUserId
,
userName
,
userMobil
e
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
if
(
null
==
application
)
{
logger
.
info
(
"登录企业应用 没授权!gicEnterpriseId:{}"
,
gicEnterpriseId
);
...
...
@@ -570,7 +573,7 @@ public class LoginController extends WebBaseController {
*/
@RequestMapping
(
"/gic-login-check"
)
@IgnoreLogin
public
ModelAndView
gicLogin
(
String
code
,
String
hbEnt
,
String
hbPage
,
String
operationUserId
,
String
userName
)
throws
UnsupportedEncodingException
{
public
ModelAndView
gicLogin
(
String
code
,
String
hbEnt
,
String
hbPage
,
String
operationUserId
,
String
userName
,
String
userMobile
)
throws
UnsupportedEncodingException
{
logger
.
info
(
"gic登录clerkId={},hbEnt={},operationUserId={},userName={}"
,
code
,
hbEnt
,
operationUserId
,
userName
);
PowerClerkDTO
clerkDTO
=
this
.
userService
.
haobanLoginBack
(
code
);
if
(
clerkDTO
==
null
)
{
...
...
@@ -592,6 +595,7 @@ public class LoginController extends WebBaseController {
userName
=
URLDecoder
.
decode
(
userName
,
"UTF-8"
);
}
retMap
.
put
(
"userName"
,
userName
)
;
retMap
.
put
(
"userMobile"
,
userMobile
)
;
String
ret
=
JSONObject
.
toJSONString
(
retMap
);
AES
aes
=
SecureUtil
.
aes
(
LOGIN_KEY
.
getBytes
());
String
random
=
aes
.
encryptHex
(
ret
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/WebLoginVO.java
View file @
c09129b9
...
...
@@ -28,6 +28,11 @@ public class WebLoginVO implements Serializable {
private
String
operationUserId
;
private
String
operationUserName
;
/**
* 运维登录人手机号
*/
private
String
userMobile
;
public
String
getStaffId
()
{
return
staffId
;
}
...
...
@@ -149,4 +154,13 @@ public class WebLoginVO implements Serializable {
this
.
operationUserName
=
operationUserName
;
return
this
;
}
public
String
getUserMobile
()
{
return
userMobile
;
}
public
WebLoginVO
setUserMobile
(
String
userMobile
)
{
this
.
userMobile
=
userMobile
;
return
this
;
}
}
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