Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8df6428d
authored
Dec 30, 2021
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
标准接口api
1 parent
9e13172b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
9 deletions
src/main/java/cn/com/glsx/stdinterface/api/DeviceLocationClient.java
src/main/java/cn/com/glsx/stdinterface/dto/DeviceLocationDto.java
src/main/java/cn/com/glsx/stdinterface/fallback/DeviceLocationFallbackImpl.java
src/main/java/cn/com/glsx/stdinterface/api/DeviceLocationClient.java
View file @
8df6428
...
...
@@ -27,14 +27,14 @@ public interface DeviceLocationClient {
* @param deviceLocationDtos 设备上点集合
* @return
*/
@PostMapping
(
value
=
"/
saveorupdatedevicelocationdata
"
)
@PostMapping
(
value
=
"/
dropLibrary
"
)
@ResponseBody
R
saveOrUpdateDeviceLocationData
(
@RequestBody
Collection
<
DeviceLocationDto
>
deviceLocationDtos
);
R
dropLibrary
(
@RequestBody
Collection
<
DeviceLocationDto
>
deviceLocationDtos
);
/**
* 获取E盾中的所有设备号集合
*/
@GetMapping
(
value
=
"get
allsninneweshield
"
)
@GetMapping
(
value
=
"get
AllSn
"
)
@ResponseBody
R
<
List
<
String
>>
getAllSn
InNewEshield
();
R
<
List
<
String
>>
getAllSn
();
}
src/main/java/cn/com/glsx/stdinterface/dto/DeviceLocationDto.java
View file @
8df6428
...
...
@@ -15,7 +15,7 @@ public class DeviceLocationDto {
/**
* 主键id
*/
private
Integer
id
;
private
Long
id
;
/**
* 设备号
...
...
@@ -33,6 +33,21 @@ public class DeviceLocationDto {
private
Date
lastBsTime
;
/**
* 速度
*/
private
Integer
speed
;
/**
* 对应大数据侧状态 1、静止 3、行驶
*/
private
Integer
stayStatus
;
/**
* 设备状态最新更新时间
*/
private
Date
stayStatusUpdatetime
;
/**
* 创建时间
*/
private
Date
createdTime
;
...
...
src/main/java/cn/com/glsx/stdinterface/fallback/DeviceLocationFallbackImpl.java
View file @
8df6428
...
...
@@ -23,14 +23,14 @@ public class DeviceLocationFallbackImpl implements DeviceLocationClient {
private
Throwable
cause
;
@Override
public
R
<
Integer
>
saveOrUpdateDeviceLocationData
(
Collection
<
DeviceLocationDto
>
deviceLocationDtos
)
{
log
.
warn
(
"
saveOrUpdateDeviceLocationData===
熔断啦 {}"
,
cause
.
getMessage
());
public
R
<
Integer
>
dropLibrary
(
Collection
<
DeviceLocationDto
>
deviceLocationDtos
)
{
log
.
warn
(
"
dropLibrary===设备位置数据落库
熔断啦 {}"
,
cause
.
getMessage
());
return
R
.
ok
(
"服务异常"
);
}
@Override
public
R
<
List
<
String
>>
getAllSn
InNewEshield
()
{
log
.
warn
(
"getAllSn
InNewEshield
===熔断啦 {}"
,
cause
.
getMessage
());
public
R
<
List
<
String
>>
getAllSn
()
{
log
.
warn
(
"getAllSn===熔断啦 {}"
,
cause
.
getMessage
());
return
R
.
ok
(
"服务异常"
);
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment