Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
4900ccfe
Commit
4900ccfe
authored
Jun 16, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录数据处理调整
parent
1e68a89e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
LoginController.java
...ava/com/gic/operation/web/controller/LoginController.java
+9
-1
No files found.
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/LoginController.java
View file @
4900ccfe
...
...
@@ -9,6 +9,8 @@ import com.ctrip.framework.apollo.Config;
import
com.ctrip.framework.apollo.ConfigService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -37,6 +39,8 @@ import com.gic.open.api.service.market.MarketUserApiService;
@RestController
public
class
LoginController
{
private
static
final
Logger
LOGGER
=
LogManager
.
getLogger
(
LoginController
.
class
);
@Autowired
private
OperationUserApiService
operationUserApiService
;
@Autowired
...
...
@@ -93,6 +97,8 @@ public class LoginController {
@RequestMapping
(
"login-gic"
)
public
RestResponse
login
(
Integer
enterpriseId
,
String
redirectUrl
)
throws
IOException
{
long
startTime
=
System
.
currentTimeMillis
();
Config
config
=
ConfigService
.
getConfig
(
"COMMON.4.0-gic-properties"
);
String
url
=
config
.
getProperty
(
"service_host"
,
""
).
replace
(
"/gic"
,
""
);
if
(
StringUtils
.
isBlank
(
redirectUrl
))
{
...
...
@@ -155,7 +161,7 @@ public class LoginController {
}
//查询全部的操作模块
Map
<
String
,
MenuInfo
>
moduleMap
=
new
HashMap
<>(
16
);
ServiceResponse
<
List
<
MenuDTO
>>
allGicMenu
=
menuApiService
.
get
SuperAdminMenuNotTree
(
enterpriseId
);
ServiceResponse
<
List
<
MenuDTO
>>
allGicMenu
=
menuApiService
.
get
AllMenuNotTree
(
enterpriseDTO
.
getVersionCode
()
);
if
(
allGicMenu
.
isSuccess
())
{
List
<
MenuDTO
>
temp
=
allGicMenu
.
getResult
();
List
<
MenuInfo
>
tempMenuInfoList
=
EntityUtil
.
changeEntityListNew
(
MenuInfo
.
class
,
temp
);
...
...
@@ -177,6 +183,8 @@ public class LoginController {
//塞缓存
token
=
UserDetailUtils
.
setUserDetail
(
userDetail
);
LOGGER
.
info
(
"单点登录所花时间:{}"
,
System
.
currentTimeMillis
()
-
startTime
);
String
SSO_LOGIN_URL
=
url
+
"/gic-auth-web/login-for-operation"
;
return
RestResponse
.
success
(
SSO_LOGIN_URL
+
"?token="
+
token
+
"&redirectUrl="
+
redirectUrl
);
}
...
...
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