From ba55d44ea9f61a007f5c63fb8689488cc35d48ee Mon Sep 17 00:00:00 2001
From: chen_xi <276999030@qq.com>
Date: Mon, 26 Sep 2022 15:05:56 +0800
Subject: [PATCH] 多站单参接口修改
---
screen-api/src/main/java/com/moral/api/controller/CruiserController.java | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/CruiserController.java b/screen-api/src/main/java/com/moral/api/controller/CruiserController.java
index ee0ddcd..cda4705 100644
--- a/screen-api/src/main/java/com/moral/api/controller/CruiserController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/CruiserController.java
@@ -38,7 +38,25 @@
@GetMapping("selectCruisers")
@ApiOperation(value = "������������������������������������������", notes = "���������������")
public ResultMessage getCarsInfo() {
- List<Map<String, Object>> response = specialDeviceService.getCarsInfo();
+ List<Map<String, Object>> response = specialDeviceService.selectCruisers();
+ return ResultMessage.ok(response);
+ }
+
+ /**
+ * @param mac ������mac
+ * @return ������������������������������������
+ */
+ @GetMapping("getDates")
+ @ApiOperation(value = "������������������������������", notes = "������������������������������")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"),
+ @ApiImplicitParam(name = "mac", value = "������mac", required = true, paramType = "query", dataType = "String")
+ })
+ public ResultMessage getDates(String mac) {
+ if (ObjectUtils.isEmpty(mac)) {
+ return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
+ }
+ List<String> response = specialDeviceService.getDatesByMac(mac);
return ResultMessage.ok(response);
}
@@ -55,7 +73,7 @@
})
public ResultMessage carTrajectory(HttpServletRequest request) {
Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
- if (!params.containsKey("mac") || !params.containsKey("time")) {
+ if (!params.containsKey("mac") || !params.containsKey("time1")|| !params.containsKey("time2")) {
return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
}
List<Map<String, Object>> response = specialDeviceService.carTrajectory(params);
--
Gitblit v1.8.0