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
6bdbe34b
Commit
6bdbe34b
authored
Jul 15, 2022
by
guojx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运维名称进行转码
parent
cf5a5158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+2
-1
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+9
-2
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
6bdbe34b
...
@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -405,7 +406,7 @@ public class EnterpriseController extends WebBaseController {
...
@@ -405,7 +406,7 @@ public class EnterpriseController extends WebBaseController {
AuthcenterUserDetails
loginUser
=
(
AuthcenterUserDetails
)
SessionContextUtil
.
getUser
(
request
)
;
AuthcenterUserDetails
loginUser
=
(
AuthcenterUserDetails
)
SessionContextUtil
.
getUser
(
request
)
;
String
operationUserId
=
String
.
valueOf
(
loginUser
.
getId
());
String
operationUserId
=
String
.
valueOf
(
loginUser
.
getId
());
//运维信息参数
//运维信息参数
String
operationInfo
=
"&operationUserId="
+
operationUserId
+
"&userName="
+
loginUser
.
getRealName
(
);
String
operationInfo
=
"&operationUserId="
+
operationUserId
+
"&userName="
+
URLEncoder
.
encode
(
loginUser
.
getRealName
(),
"UTF-8"
);
String
random
=
"ywLogin:"
+
UuidUtil
.
randomUUID
();
String
random
=
"ywLogin:"
+
UuidUtil
.
randomUUID
();
RedisUtil
.
setCache
(
random
,
1
,
10L
);
RedisUtil
.
setCache
(
random
,
1
,
10L
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
6bdbe34b
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -200,7 +201,7 @@ public class LoginController extends WebBaseController {
...
@@ -200,7 +201,7 @@ public class LoginController extends WebBaseController {
@IgnoreLogin
@IgnoreLogin
@RequestMapping
(
"yw-login"
)
@RequestMapping
(
"yw-login"
)
public
HaobanResponse
ywLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
random
,
public
HaobanResponse
ywLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
random
,
HttpServletResponse
response
,
String
operationUserId
,
String
userName
)
{
HttpServletResponse
response
,
String
operationUserId
,
String
userName
)
throws
UnsupportedEncodingException
{
// 判断是否存在random
// 判断是否存在random
Object
o
=
RedisUtil
.
getCache
(
random
);
Object
o
=
RedisUtil
.
getCache
(
random
);
if
(
o
==
null
)
{
if
(
o
==
null
)
{
...
@@ -210,6 +211,9 @@ public class LoginController extends WebBaseController {
...
@@ -210,6 +211,9 @@ public class LoginController extends WebBaseController {
return
this
.
fail
(
"微信企业和gic商户参数为空"
);
return
this
.
fail
(
"微信企业和gic商户参数为空"
);
}
}
String
gicSuperPhone
=
clerkService
.
getSuperAdminPhoneNumber
(
gicEnterpriseId
);
String
gicSuperPhone
=
clerkService
.
getSuperAdminPhoneNumber
(
gicEnterpriseId
);
if
(
StringUtils
.
isNotBlank
(
userName
))
{
userName
=
URLDecoder
.
decode
(
userName
,
"UTF-8"
);
}
logger
.
info
(
"好办运维登录商户id={},超管手机={},运维信息:{}-{}"
,
gicEnterpriseId
,
gicSuperPhone
,
operationUserId
,
userName
);
logger
.
info
(
"好办运维登录商户id={},超管手机={},运维信息:{}-{}"
,
gicEnterpriseId
,
gicSuperPhone
,
operationUserId
,
userName
);
if
(
StringUtils
.
isBlank
(
gicSuperPhone
))
{
if
(
StringUtils
.
isBlank
(
gicSuperPhone
))
{
return
this
.
fail
(
"商户超管的手机号未配置"
);
return
this
.
fail
(
"商户超管的手机号未配置"
);
...
@@ -566,7 +570,7 @@ public class LoginController extends WebBaseController {
...
@@ -566,7 +570,7 @@ public class LoginController extends WebBaseController {
*/
*/
@RequestMapping
(
"/gic-login-check"
)
@RequestMapping
(
"/gic-login-check"
)
@IgnoreLogin
@IgnoreLogin
public
ModelAndView
gicLogin
(
String
code
,
String
hbEnt
,
String
hbPage
,
String
operationUserId
,
String
userName
)
{
public
ModelAndView
gicLogin
(
String
code
,
String
hbEnt
,
String
hbPage
,
String
operationUserId
,
String
userName
)
throws
UnsupportedEncodingException
{
logger
.
info
(
"gic登录clerkId={},hbEnt={},operationUserId={},userName={}"
,
code
,
hbEnt
,
operationUserId
,
userName
);
logger
.
info
(
"gic登录clerkId={},hbEnt={},operationUserId={},userName={}"
,
code
,
hbEnt
,
operationUserId
,
userName
);
PowerClerkDTO
clerkDTO
=
this
.
userService
.
haobanLoginBack
(
code
);
PowerClerkDTO
clerkDTO
=
this
.
userService
.
haobanLoginBack
(
code
);
if
(
clerkDTO
==
null
)
{
if
(
clerkDTO
==
null
)
{
...
@@ -584,6 +588,9 @@ public class LoginController extends WebBaseController {
...
@@ -584,6 +588,9 @@ public class LoginController extends WebBaseController {
retMap
.
put
(
"timestamp"
,
System
.
currentTimeMillis
()+
""
)
;
retMap
.
put
(
"timestamp"
,
System
.
currentTimeMillis
()+
""
)
;
//运维登录信息
//运维登录信息
retMap
.
put
(
"operationUserId"
,
operationUserId
)
;
retMap
.
put
(
"operationUserId"
,
operationUserId
)
;
if
(
StringUtils
.
isNotBlank
(
userName
))
{
userName
=
URLDecoder
.
decode
(
userName
,
"UTF-8"
);
}
retMap
.
put
(
"userName"
,
userName
)
;
retMap
.
put
(
"userName"
,
userName
)
;
String
ret
=
JSONObject
.
toJSONString
(
retMap
);
String
ret
=
JSONObject
.
toJSONString
(
retMap
);
AES
aes
=
SecureUtil
.
aes
(
LOGIN_KEY
.
getBytes
());
AES
aes
=
SecureUtil
.
aes
(
LOGIN_KEY
.
getBytes
());
...
...
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