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
6b224ce4
Commit
6b224ce4
authored
May 20, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运维登录
parent
0025a5cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+8
-7
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+4
-13
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
6b224ce4
...
@@ -408,19 +408,20 @@ public class EnterpriseController extends WebBaseController {
...
@@ -408,19 +408,20 @@ public class EnterpriseController extends WebBaseController {
/**
/**
* 登录
* 登录
*
* @param wxEnterpriseId 企业微信id
* @param wxEnterpriseId 企业微信id
* @param httpServletResponse response
* @throws IOException exception
*/
*/
@RequestMapping
(
"yw-login"
)
@RequestMapping
(
"yw-login"
)
public
void
ywLogin
(
String
wx
EnterpriseId
,
HttpServletResponse
httpServletResponse
)
throws
IOException
{
public
HaobanResponse
ywLogin
(
String
wxEnterpriseId
,
String
gic
EnterpriseId
,
HttpServletResponse
httpServletResponse
)
throws
IOException
{
String
host
=
GlobalVar
.
ctxPropertiesMap
.
get
(
"haoban_service_host"
);
String
host
=
GlobalVar
.
ctxPropertiesMap
.
get
(
"haoban_service_host"
);
logger
.
info
(
"host============================>{}"
,
host
);
logger
.
info
(
"好办运维login,host={},gicEnterpriseId={},wxEnterpriseId={}"
,
host
,
gicEnterpriseId
,
wxEnterpriseId
);
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isAnyBlank
(
wxEnterpriseId
,
gicEnterpriseId
))
{
return
this
.
fail
(
"wxEnterpriseId和gicEnterpriseId都不能为空"
)
;
}
String
random
=
"ywLogin:"
+
UuidUtil
.
randomUUID
();
String
random
=
"ywLogin:"
+
UuidUtil
.
randomUUID
();
RedisUtil
.
setCache
(
random
,
1
,
10
00
L
);
RedisUtil
.
setCache
(
random
,
1
,
10L
);
String
url
=
host
+
LOGIN_URL
+
"?wxEnterpriseId="
+
wxEnterpriseId
+
"&random="
+
random
;
String
url
=
host
+
LOGIN_URL
+
"?
gicEnterpriseId="
+
gicEnterpriseId
+
"&
wxEnterpriseId="
+
wxEnterpriseId
+
"&random="
+
random
;
httpServletResponse
.
sendRedirect
(
url
);
httpServletResponse
.
sendRedirect
(
url
);
return
this
.
success
(
null
)
;
}
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
6b224ce4
...
@@ -146,24 +146,15 @@ public class LoginController extends WebBaseController {
...
@@ -146,24 +146,15 @@ public class LoginController extends WebBaseController {
*/
*/
@IgnoreLogin
@IgnoreLogin
@RequestMapping
(
"yw-login"
)
@RequestMapping
(
"yw-login"
)
public
HaobanResponse
ywLogin
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
random
,
public
HaobanResponse
ywLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
random
,
HttpServletResponse
response
)
{
HttpServletResponse
response
)
{
// 判断是否存在random
// 判断是否存在random
Object
o
=
RedisUtil
.
getCache
(
random
);
Object
o
=
RedisUtil
.
getCache
(
random
);
if
(
o
==
null
)
{
if
(
o
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_4
);
return
resultResponse
(
HaoBanErrCode
.
ERR_4
);
}
}
if
(
StringUtils
.
isBlank
(
enterpriseId
))
{
String
gicSuperPhone
=
clerkService
.
getSuperAdminPhoneNumber
(
gicEnterpriseId
);
List
<
EnterpriseDetailDTO
>
list
=
this
.
wxEnterpriseRelatedApiService
logger
.
info
(
"好办运维登录商户id={},超管手机={}"
,
gicEnterpriseId
,
gicSuperPhone
);
.
listEnterpriseByWxEnterpriseId
(
wxEnterpriseId
);
String
result
=
this
.
doLogin
(
wxEnterpriseId
,
gicEnterpriseId
,
gicSuperPhone
,
"yw"
,
response
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_4
);
}
enterpriseId
=
list
.
get
(
0
).
getEnterpriseId
();
}
String
gicSuperPhone
=
clerkService
.
getSuperAdminPhoneNumber
(
enterpriseId
);
logger
.
info
(
"登录商户id={},超管手机={}"
,
enterpriseId
,
gicSuperPhone
);
String
result
=
this
.
doLogin
(
wxEnterpriseId
,
enterpriseId
,
gicSuperPhone
,
"yw"
,
response
);
if
(
StringUtils
.
isNotBlank
(
result
))
{
if
(
StringUtils
.
isNotBlank
(
result
))
{
return
this
.
fail
(
result
);
return
this
.
fail
(
result
);
}
}
...
...
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