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 517abbb8
authored
May 22, 2021
by
王欣伟
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
api完成修改
1 parent
00db2a25
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
1 deletions
pom.xml
src/main/java/cn/com/glsx/devicemonitor/api/dto/response/GpsLocation.java
src/main/java/cn/com/glsx/devicemonitor/api/feign/GpsBsService.java
src/main/java/cn/com/glsx/devicemonitor/api/feign/fallback/GpsBsServiceFallbackImpl.java
src/main/resources/META-INF/spring.factories
pom.xml
View file @
517abbb
...
...
@@ -28,6 +28,11 @@
<scope>
compile
</scope>
</dependency>
<!--<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-core</artifactId>
<version>1.1.1-SNAPSHOT</version>
</dependency>-->
<!-- swagger -->
<dependency>
...
...
src/main/java/cn/com/glsx/devicemonitor/api/dto/response/GpsLocation.java
View file @
517abbb
...
...
@@ -56,4 +56,26 @@ public class GpsLocation implements Serializable {
* 地址信息
*/
private
String
address
;
/**
* 海拔
*/
private
String
alt
;
/**
* 方向
*/
private
String
dir
;
/**
* 存储时间
*/
private
String
storeTime
;
/**
* 速度
*/
private
String
speed
;
}
src/main/java/cn/com/glsx/devicemonitor/api/feign/GpsBsService.java
View file @
517abbb
...
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.validation.constraints.NotBlank
;
/**
* @author wangxw
* @version 1.0.0
...
...
@@ -21,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam;
*
* @createTime 2021年05月21日 15:19:00
*/
@FeignClient
(
name
=
"${feign.
server.name}"
,
url
=
"${feign.server.url
}"
,
fallbackFactory
=
GpsBsServiceFallbackFactory
.
class
,
decode404
=
true
)
@FeignClient
(
name
=
"${feign.
monitor.name}"
,
path
=
"${feign.monitor.path
}"
,
fallbackFactory
=
GpsBsServiceFallbackFactory
.
class
,
decode404
=
true
)
public
interface
GpsBsService
{
/**
...
...
@@ -40,4 +42,14 @@ public interface GpsBsService {
*/
@GetMapping
(
value
=
"/single"
)
public
R
getLastGpsBsBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
);
/**
* 获取设备的历史轨迹
* @param sn
* @param deviceCode
* @return
*/
@GetMapping
(
value
=
"/single/history"
)
public
R
getLastGpsBsHistoryBySn
(
@RequestParam
(
value
=
"sn"
)
String
sn
,
@RequestParam
(
value
=
"deviceCode"
)
String
deviceCode
,
@RequestParam
(
value
=
"startTime"
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
)
String
endTime
);
}
src/main/java/cn/com/glsx/devicemonitor/api/feign/fallback/GpsBsServiceFallbackImpl.java
View file @
517abbb
...
...
@@ -49,4 +49,9 @@ public class GpsBsServiceFallbackImpl implements GpsBsService {
public
R
getLastGpsBsBySn
(
String
sn
,
String
deviceCode
)
{
return
R
.
ok
(
"无数据"
);
}
@Override
public
R
getLastGpsBsHistoryBySn
(
String
sn
,
String
deviceCode
,
String
startTime
,
String
endTime
)
{
return
R
.
ok
(
"无数据"
);
}
}
src/main/resources/META-INF/spring.factories
0 → 100644
View file @
517abbb
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cn.com.glsx.devicemonitor.api.feign.fallback.GpsBsServiceFallbackImpl,\
cn.com.glsx.devicemonitor.api.feign.factory.GpsBsServiceFallbackFactory
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