Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-devicemonitor-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 d6d51170
authored
Jun 02, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加设备批量同步接口
1 parent
85f2a821
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
src/main/java/cn/com/glsx/devicemonitor/api/feign/DeviceFeignService.java
src/main/java/cn/com/glsx/devicemonitor/api/feign/fallback/DeviceServiceFallbackImpl.java
src/main/java/cn/com/glsx/devicemonitor/api/feign/DeviceFeignService.java
View file @
d6d5117
...
...
@@ -55,6 +55,15 @@ public interface DeviceFeignService {
R
<
DeviceDTO
>
getOrStoreDeviceBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"storeIfNotExists"
)
Boolean
storeIfNotExists
);
/**
* 根据设备号查询设备信息
*
* @param sns 设备号集合
* @return
*/
@PostMapping
(
value
=
"/getOrStoreDeviceBySns"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
List
<
DeviceDTO
>>
getOrStoreDeviceBySns
(
@RequestBody
List
<
String
>
sns
);
/**
* 获取设备的状态
*
* @param sn
...
...
src/main/java/cn/com/glsx/devicemonitor/api/feign/fallback/DeviceServiceFallbackImpl.java
View file @
d6d5117
...
...
@@ -38,6 +38,12 @@ public class DeviceServiceFallbackImpl implements DeviceFeignService {
}
@Override
public
R
<
List
<
DeviceDTO
>>
getOrStoreDeviceBySns
(
List
<
String
>
sns
)
{
log
.
info
(
"getOrStoreDeviceBySns 熔断啦==={}"
,
cause
.
getMessage
());
return
R
.
ok
(
"无数据"
);
}
@Override
public
R
<
DeviceStatusModel
>
getDeviceStatusBySn
(
String
sn
,
Long
offlineTime
)
{
log
.
info
(
"getDeviceStatusBySn 熔断啦==={}"
,
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