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
c29c53a5
Commit
c29c53a5
authored
Dec 21, 2021
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:登录兼容
parent
e62a7c57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+15
-6
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
c29c53a5
...
@@ -255,7 +255,8 @@ public class LoginController extends WebBaseController {
...
@@ -255,7 +255,8 @@ public class LoginController extends WebBaseController {
return
model
;
return
model
;
}
}
//获取管理员列表
//获取管理员列表
String
adminList
=
qywxSuiteApiService
.
getAdminList
(
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
application
.
getAgentId
()));
String
corpid
=
enterprise
.
getCorpid
();
String
adminList
=
qywxSuiteApiService
.
getAdminList
(
corpid
,
application
.
getSiteId
(),
Integer
.
parseInt
(
application
.
getAgentId
()));
List
<
String
>
userIds
=
new
ArrayList
<
String
>();
List
<
String
>
userIds
=
new
ArrayList
<
String
>();
if
(
StringUtils
.
isNotBlank
(
adminList
))
{
if
(
StringUtils
.
isNotBlank
(
adminList
))
{
JSONArray
jsonArr
=
JSON
.
parseArray
(
adminList
);
JSONArray
jsonArr
=
JSON
.
parseArray
(
adminList
);
...
@@ -264,11 +265,19 @@ public class LoginController extends WebBaseController {
...
@@ -264,11 +265,19 @@ public class LoginController extends WebBaseController {
userIds
.
add
(
json
.
getString
(
"userid"
));
userIds
.
add
(
json
.
getString
(
"userid"
));
}
}
}
}
//兼容
if
(!
userIds
.
contains
(
staff
.
getWxUserId
()))
{
if
(
corpid
.
length
()
>
20
)
{
logger
.
info
(
"登录失败,当前用户不是管理员:{}"
,
JSON
.
toJSONString
(
userIds
));
if
(!
userIds
.
contains
(
staff
.
getWxOpenUseId
()))
{
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
logger
.
info
(
"登录失败,当前用户不是管理员:{}"
,
JSON
.
toJSONString
(
userIds
));
return
model
;
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
}
}
else
{
if
(!
userIds
.
contains
(
staff
.
getWxUserId
()))
{
logger
.
info
(
"登录失败,当前用户不是管理员:{}"
,
JSON
.
toJSONString
(
userIds
));
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
}
}
}
LoginDTO
loginDTO
=
new
LoginDTO
();
LoginDTO
loginDTO
=
new
LoginDTO
();
loginDTO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
loginDTO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
...
...
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