From 85fc9222817d21d309eaa5dae127d235c309d1e9 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Thu, 20 Oct 2022 11:01:04 +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