Commit 517abbb8 by 王欣伟

api完成修改

1 parent 00db2a25
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!--<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-core</artifactId>
<version>1.1.1-SNAPSHOT</version>
</dependency>-->
<!-- swagger --> <!-- swagger -->
<dependency> <dependency>
......
...@@ -56,4 +56,26 @@ public class GpsLocation implements Serializable { ...@@ -56,4 +56,26 @@ public class GpsLocation implements Serializable {
* 地址信息 * 地址信息
*/ */
private String address; private String address;
/**
* 海拔
*/
private String alt;
/**
* 方向
*/
private String dir;
/**
* 存储时间
*/
private String storeTime;
/**
* 速度
*/
private String speed;
} }
...@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank;
/** /**
* @author wangxw * @author wangxw
* @version 1.0.0 * @version 1.0.0
...@@ -21,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -21,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* *
* @createTime 2021年05月21日 15:19:00 * @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 { public interface GpsBsService {
/** /**
...@@ -40,4 +42,14 @@ public interface GpsBsService { ...@@ -40,4 +42,14 @@ public interface GpsBsService {
*/ */
@GetMapping(value = "/single") @GetMapping(value = "/single")
public R getLastGpsBsBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode); 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);
} }
...@@ -49,4 +49,9 @@ public class GpsBsServiceFallbackImpl implements GpsBsService { ...@@ -49,4 +49,9 @@ public class GpsBsServiceFallbackImpl implements GpsBsService {
public R getLastGpsBsBySn(String sn, String deviceCode) { public R getLastGpsBsBySn(String sn, String deviceCode) {
return R.ok("无数据"); return R.ok("无数据");
} }
@Override
public R getLastGpsBsHistoryBySn(String sn, String deviceCode, String startTime, String endTime) {
return R.ok("无数据");
}
} }
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cn.com.glsx.devicemonitor.api.feign.fallback.GpsBsServiceFallbackImpl,\
cn.com.glsx.devicemonitor.api.feign.factory.GpsBsServiceFallbackFactory
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!