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
a6d2090c
Commit
a6d2090c
authored
Jul 16, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/for-yx' into for-yx
parents
006da383
f92d2851
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
OperateController.java
...ava/iot/sixiang/license/controller/OperateController.java
+3
-6
AlarmReadServiceImpl.java
...ot/sixiang/license/service/impl/AlarmReadServiceImpl.java
+4
-0
XssHttpServletRequestWrapper.java
...iot/sixiang/license/xss/XssHttpServletRequestWrapper.java
+1
-1
No files found.
license/src/main/java/iot/sixiang/license/controller/OperateController.java
View file @
a6d2090c
...
...
@@ -104,9 +104,6 @@ public class OperateController {
String
user
=
UserUtils
.
getLoginUserId
();
int
userI
=
Integer
.
valueOf
(
user
);
List
<
AlarmVo
>
alarmList
=
alarmService
.
getAlarmList
(
userI
);
for
(
AlarmVo
alarmVo
:
alarmList
)
{
alarmVo
.
setLevelDescribe
(
ESAPI
.
encoder
().
encodeForHTML
(
alarmVo
.
getLevelDescribe
()));
}
return
ResResult
.
success
().
goRecord
(
alarmList
);
}
...
...
@@ -114,9 +111,9 @@ public class OperateController {
@PostMapping
(
"alarm/read"
)
@MyLog
(
title
=
"将告警信息状态设为已读"
,
businessType
=
BusinessType
.
OTHER
)
public
BaseResult
readAlarm
()
{
String
i
d
=
UserUtils
.
getLoginUserId
();
int
u
serId
=
Integer
.
valueOf
(
id
);
boolean
res
=
alarmReadService
.
readAlarm
(
u
serId
);
String
i
=
UserUtils
.
getLoginUserId
();
int
u
I
=
Integer
.
valueOf
(
i
);
boolean
res
=
alarmReadService
.
readAlarm
(
u
I
);
if
(
res
)
{
return
BaseResult
.
success
();
}
else
{
...
...
license/src/main/java/iot/sixiang/license/service/impl/AlarmReadServiceImpl.java
View file @
a6d2090c
...
...
@@ -8,9 +8,11 @@ import iot.sixiang.license.mapper.AlarmMapper;
import
iot.sixiang.license.mapper.AlarmReadMapper
;
import
iot.sixiang.license.model.vo.AlarmVo
;
import
iot.sixiang.license.service.AlarmReadService
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.List
;
/**
...
...
@@ -29,12 +31,14 @@ public class AlarmReadServiceImpl extends ServiceImpl<AlarmReadMapper, AlarmRead
@Resource
AlarmReadMapper
alarmReadMapper
;
@Override
public
boolean
readAlarm
(
int
userId
)
{
if
(
userId
==
0
)
{
throw
new
IotLicenseException
(
ResultCode
.
VALIDATE_FAILED
.
getCode
(),
ResultCode
.
VALIDATE_FAILED
.
getMsg
());
}
List
<
AlarmVo
>
alarmList
=
alarmMapper
.
getAlarmList
(
userId
);
for
(
AlarmVo
alarm:
alarmList
)
{
if
(
alarm
.
getReadFlag
()
==
0
)
{
int
alarmId
=
alarm
.
getId
();
...
...
license/src/main/java/iot/sixiang/license/xss/XssHttpServletRequestWrapper.java
View file @
a6d2090c
...
...
@@ -56,7 +56,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
if
(
isMultipartContent
||
isMultipart
)
{
fileUpload
=
true
;
}
try
(
BufferedReader
isr
=
new
BufferedReader
(
new
InputStreamReader
(
ins
,
StandardCharsets
.
UTF_8
))
;
)
{
try
(
BufferedReader
isr
=
new
BufferedReader
(
new
InputStreamReader
(
ins
,
StandardCharsets
.
UTF_8
)))
{
String
line
=
""
;
while
((
line
=
isr
.
readLine
())
!=
null
)
{
sb
.
append
(
line
);
...
...
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