Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
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
station
YeeAmosFireAutoSysRoot
Commits
7c128f39
Commit
7c128f39
authored
Feb 20, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务 15178
parent
78a10157
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
LoginController.java
...yeejoin/amos/fas/business/controller/LoginController.java
+9
-2
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/LoginController.java
View file @
7c128f39
...
...
@@ -70,6 +70,12 @@ public class LoginController {
@Value
(
"${amos.system.user.app-key}"
)
private
String
appKey
;
@Value
(
"${amos.system.privilege.user.app-key:AMOS_ADMIN}"
)
private
String
appKeyPrivilege
;
@Value
(
"${amos.system.privilege.user.product:AMOS-WEB-ADMIN}"
)
private
String
productPrivilege
;
@ApiOperation
(
value
=
"通过userId登录"
,
notes
=
"查询设备指标"
)
@GetMapping
(
value
=
"/{userId}"
)
synchronized
public
ReginParams
getBindEquipment
(
@PathVariable
(
"userId"
)
String
userId
)
throws
Exception
{
...
...
@@ -105,9 +111,10 @@ public class LoginController {
if
(
ObjectUtils
.
isEmpty
(
feignClientResult
.
getResult
())){
throw
new
Exception
(
"缺失登录信息"
);
}
// 调用平台授权接口
Map
<
String
,
String
>
re
=
(
Map
<
String
,
String
>)
feignClientResult
.
getResult
();
String
amosToken
=
re
.
get
(
"token"
);
privilegeFeign
.
warrant
(
appKey
,
product
,
amosToken
);
privilegeFeign
.
warrant
(
appKey
Privilege
,
productPrivilege
,
amosToken
);
RequestContext
.
setToken
(
amosToken
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
...
...
@@ -124,7 +131,7 @@ public class LoginController {
reginParams
.
setToken
(
amosToken
);
reginParams
.
setUserModel
(
userModel
);
redisTemplate
.
opsForValue
().
set
(
buildKey
(
userId
,
token
),
JSONObject
.
toJSONString
(
reginParams
),
28
,
TimeUnit
.
DAYS
);
redisTemplate
.
opsForValue
().
set
(
buildKey
(
userId
,
amosToken
),
JSONObject
.
toJSONString
(
reginParams
),
28
,
TimeUnit
.
DAYS
);
//
redisTemplate.opsForValue().set(buildKey(userId, amosToken), JSONObject.toJSONString(reginParams),28, TimeUnit.DAYS);
return
reginParams
;
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
7c128f39
...
...
@@ -111,6 +111,8 @@ data.type.extinguisher=3104
#消火栓:3105
data.type.hydrant
=
3105
#amos.system.privilege.user.product=AMOS-WEB-ADMIN
#amos.system.privilege.user.app-key=AMOS_ADMIN
outSystem.fegin.name
=
unKnow
outSystem.user.password
=
a1234560
...
...
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