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 0f6ed450
authored
Sep 10, 2021
by
黄小葱
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加consumes的类型
1 parent
b1cd38ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
src/main/java/cn/com/glsx/devicemonitor/api/feign/DeviceFeignService.java
src/main/java/cn/com/glsx/devicemonitor/api/feign/GpsBsService.java
src/main/java/cn/com/glsx/devicemonitor/api/feign/DeviceFeignService.java
View file @
0f6ed45
...
@@ -16,7 +16,7 @@ import javax.validation.constraints.NotBlank;
...
@@ -16,7 +16,7 @@ import javax.validation.constraints.NotBlank;
*/
*/
@FeignClient
(
@FeignClient
(
name
=
"${feign.devicemonitor.name}"
,
name
=
"${feign.devicemonitor.name}"
,
path
=
"${feign.devicemonitor.path}/device"
,
path
=
"${feign.devicemonitor.path}/
api/
device"
,
contextId
=
"feignApiDevice"
,
contextId
=
"feignApiDevice"
,
fallbackFactory
=
DeviceServiceFallbackFactory
.
class
,
decode404
=
true
)
fallbackFactory
=
DeviceServiceFallbackFactory
.
class
,
decode404
=
true
)
public
interface
DeviceFeignService
{
public
interface
DeviceFeignService
{
...
@@ -27,7 +27,7 @@ public interface DeviceFeignService {
...
@@ -27,7 +27,7 @@ public interface DeviceFeignService {
* @param sn
* @param sn
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/getDeviceBySn"
,
consumes
=
MediaType
.
APPLICATION_
JSON
_VALUE
)
@GetMapping
(
value
=
"/getDeviceBySn"
,
consumes
=
MediaType
.
APPLICATION_
FORM_URLENCODED
_VALUE
)
R
<
DeviceDTO
>
getDeviceBySn
(
@NotBlank
(
message
=
"设备号不能为空"
)
@RequestParam
(
value
=
"sn"
)
String
sn
);
R
<
DeviceDTO
>
getDeviceBySn
(
@NotBlank
(
message
=
"设备号不能为空"
)
@RequestParam
(
value
=
"sn"
)
String
sn
);
/**
/**
...
@@ -37,7 +37,7 @@ public interface DeviceFeignService {
...
@@ -37,7 +37,7 @@ public interface DeviceFeignService {
* @param offlineTime
* @param offlineTime
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/getDeviceStatusBySn"
,
consumes
=
MediaType
.
APPLICATION_
JSON
_VALUE
)
@GetMapping
(
value
=
"/getDeviceStatusBySn"
,
consumes
=
MediaType
.
APPLICATION_
FORM_URLENCODED
_VALUE
)
R
<
DeviceStatusModel
>
getDeviceStatusBySn
(
@NotBlank
(
message
=
"设备号不能为空"
)
@RequestParam
(
value
=
"sn"
)
String
sn
,
Long
offlineTime
);
R
<
DeviceStatusModel
>
getDeviceStatusBySn
(
@NotBlank
(
message
=
"设备号不能为空"
)
@RequestParam
(
value
=
"sn"
)
String
sn
,
Long
offlineTime
);
/**
/**
...
@@ -46,6 +46,6 @@ public interface DeviceFeignService {
...
@@ -46,6 +46,6 @@ public interface DeviceFeignService {
* @param sn 设备号
* @param sn 设备号
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/getDevicesTotalCount"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
@GetMapping
(
value
=
"/getDevicesTotalCount"
)
R
getDevicesTotalCount
(
@RequestParam
(
value
=
"sn"
)
String
sn
);
R
getDevicesTotalCount
(
@RequestParam
(
value
=
"sn"
)
String
sn
);
}
}
src/main/java/cn/com/glsx/devicemonitor/api/feign/GpsBsService.java
View file @
0f6ed45
...
@@ -29,13 +29,13 @@ import java.util.List;
...
@@ -29,13 +29,13 @@ import java.util.List;
*/
*/
@FeignClient
(
@FeignClient
(
name
=
"${feign.devicemonitor.name}"
,
name
=
"${feign.devicemonitor.name}"
,
path
=
"${feign.devicemonitor.path}/location"
,
path
=
"${feign.devicemonitor.path}/
api/
location"
,
contextId
=
"feignApiLocation"
,
contextId
=
"feignApiLocation"
,
fallbackFactory
=
GpsBsServiceFallbackFactory
.
class
,
decode404
=
true
)
fallbackFactory
=
GpsBsServiceFallbackFactory
.
class
,
decode404
=
true
)
public
interface
GpsBsService
{
public
interface
GpsBsService
{
@GetMapping
(
value
=
"/devicemonitorinfo"
,
consumes
=
MediaType
.
APPLICATION_
JSON
_VALUE
)
@GetMapping
(
value
=
"/devicemonitorinfo"
,
consumes
=
MediaType
.
APPLICATION_
FORM_URLENCODED
_VALUE
)
R
<
List
<
DeviceLocationBo
>>
listDeviceMonitorInfo
(
@NotBlank
(
message
=
"设备号不能为空"
)
@RequestParam
(
value
=
"sns"
)
String
sns
,
R
<
List
<
DeviceLocationBo
>>
listDeviceMonitorInfo
(
@NotBlank
(
message
=
"设备号不能为空"
)
@RequestParam
(
value
=
"sns"
)
String
sns
,
@NotBlank
(
message
=
"设备编码不能为空"
)
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
);
@NotBlank
(
message
=
"设备编码不能为空"
)
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
);
...
@@ -55,7 +55,7 @@ public interface GpsBsService {
...
@@ -55,7 +55,7 @@ public interface GpsBsService {
* @param deviceCode
* @param deviceCode
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/single"
,
consumes
=
MediaType
.
APPLICATION_
JSON
_VALUE
)
@GetMapping
(
value
=
"/single"
,
consumes
=
MediaType
.
APPLICATION_
FORM_URLENCODED
_VALUE
)
R
<
GpsBsData
>
getLastGpsBsBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
);
R
<
GpsBsData
>
getLastGpsBsBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
);
/**
/**
...
@@ -65,7 +65,7 @@ public interface GpsBsService {
...
@@ -65,7 +65,7 @@ public interface GpsBsService {
* @param deviceCode
* @param deviceCode
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/single/history"
,
consumes
=
MediaType
.
APPLICATION_
JSON
_VALUE
)
@GetMapping
(
value
=
"/single/history"
,
consumes
=
MediaType
.
APPLICATION_
FORM_URLENCODED
_VALUE
)
R
<
List
<
GpsLocation
>>
getLastGpsBsHistoryBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
,
R
<
List
<
GpsLocation
>>
getLastGpsBsHistoryBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
,
@RequestParam
(
value
=
"startTime"
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
)
String
endTime
);
@RequestParam
(
value
=
"startTime"
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
)
String
endTime
);
}
}
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