Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iot-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
back-end
iot-service
Commits
b3ffcd33
Commit
b3ffcd33
authored
Aug 14, 2020
by
chenfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复监控数据表不存在时报错情况
parent
fdc55079
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
DashboardServiceImpl.java
...t/module/dashboard/service/impl/DashboardServiceImpl.java
+7
-1
No files found.
src/main/java/com/esv/datacenter/iot/module/dashboard/service/impl/DashboardServiceImpl.java
View file @
b3ffcd33
...
@@ -52,7 +52,13 @@ public class DashboardServiceImpl implements DashboardService {
...
@@ -52,7 +52,13 @@ public class DashboardServiceImpl implements DashboardService {
+
" where device_id = ?"
+
" where device_id = ?"
+
" order by time desc limit 100"
;
+
" order by time desc limit 100"
;
log
.
info
(
"select modelData sql: {}"
,
sql
);
log
.
info
(
"select modelData sql: {}"
,
sql
);
List
<
Map
<
String
,
Object
>>
dataList
=
jdbcTemplate
.
queryForList
(
sql
,
dashboardReq
.
getDeviceId
());
List
<
Map
<
String
,
Object
>>
dataList
;
try
{
dataList
=
jdbcTemplate
.
queryForList
(
sql
,
dashboardReq
.
getDeviceId
());
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
dataList
=
new
ArrayList
<>();
}
modelDataVOList
.
add
(
new
ModelDataVO
(
modelId
,
dataList
));
modelDataVOList
.
add
(
new
ModelDataVO
(
modelId
,
dataList
));
}
}
return
modelDataVOList
;
return
modelDataVOList
;
...
...
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