Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
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
zengtianlai3
ioc_sixiang_license
Commits
578223ad
Commit
578223ad
authored
Jul 14, 2022
by
AfirSraftGarrier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
703116b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
OperateController.java
...ava/iot/sixiang/license/controller/OperateController.java
+3
-4
AlarmServiceImpl.java
...va/iot/sixiang/license/service/impl/AlarmServiceImpl.java
+3
-3
No files found.
license/src/main/java/iot/sixiang/license/controller/OperateController.java
View file @
578223ad
...
...
@@ -92,10 +92,9 @@ public class OperateController {
@GetMapping
(
"alarm/list"
)
@MyLog
(
title
=
"获取告警列表"
,
businessType
=
BusinessType
.
SELECT
)
public
ResResult
<
List
<
AlarmVo
>>
getAlarmList
()
{
String
userId
=
UserUtils
.
getLoginUserId
();
String
comeId
=
ESAPI
.
encoder
().
encodeForHTML
(
userId
);
int
Id
=
Integer
.
valueOf
(
comeId
);
List
<
AlarmVo
>
alarmList
=
alarmService
.
getAlarmList
(
Id
);
String
user
=
UserUtils
.
getLoginUserId
();
int
userI
=
Integer
.
valueOf
(
user
);
List
<
AlarmVo
>
alarmList
=
alarmService
.
getAlarmList
(
userI
);
return
ResResult
.
success
().
goRecord
(
alarmList
);
}
...
...
license/src/main/java/iot/sixiang/license/service/impl/AlarmServiceImpl.java
View file @
578223ad
...
...
@@ -25,11 +25,11 @@ public class AlarmServiceImpl extends ServiceImpl<AlarmMapper, Alarm> implements
}
@Override
public
List
<
AlarmVo
>
getAlarmList
(
int
u
serId
)
{
if
(
u
serId
==
0
)
{
public
List
<
AlarmVo
>
getAlarmList
(
int
u
I
)
{
if
(
u
I
==
0
)
{
throw
new
IotLicenseException
(
ResultCode
.
VALIDATE_FAILED
.
getCode
(),
ResultCode
.
VALIDATE_FAILED
.
getMsg
());
}
List
<
AlarmVo
>
alarmVos
=
alarmMapper
.
getAlarmList
(
u
serId
);
List
<
AlarmVo
>
alarmVos
=
alarmMapper
.
getAlarmList
(
u
I
);
alarmVos
=
alarmVos
.
stream
().
sorted
(
Comparator
.
comparing
(
AlarmVo:
:
getCreateTime
,
Comparator
.
reverseOrder
())).
collect
(
Collectors
.
toList
());
return
alarmVos
;
}
...
...
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