From 3bc57d8582d3d13e7e653b0f04dd09742c3b2c15 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 23 Aug 2021 10:20:26 +0800
Subject: [PATCH] 走航车轨迹数据单因子-》所有因子

---
 screen-api/src/main/java/com/moral/api/controller/SpecialDeviceController.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/controller/SpecialDeviceController.java b/screen-api/src/main/java/com/moral/api/controller/SpecialDeviceController.java
index ae6cf8d..7a83ed6 100644
--- a/screen-api/src/main/java/com/moral/api/controller/SpecialDeviceController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/SpecialDeviceController.java
@@ -6,6 +6,7 @@
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -40,16 +41,15 @@
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"),
             @ApiImplicitParam(name = "mac", value = "������mac", required = true, paramType = "query", dataType = "String"),
-            @ApiImplicitParam(name = "sensorCode", value = "���������code", required = true, paramType = "query", dataType = "String"),
             @ApiImplicitParam(name = "time", value = "���������2021-08-18", required = true, paramType = "query", dataType = "String")
     })
     public ResultMessage carTrajectory(HttpServletRequest request) {
         Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
-        if (!params.containsKey("mac") || !params.containsKey("sensorCode") || !params.containsKey("time")) {
+        if (!params.containsKey("mac") || !params.containsKey("time")) {
             return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
         }
         List<Map<String, Object>> response = specialDeviceService.carTrajectory(params);
-        return ResultMessage.ok(response);
+        return ObjectUtils.isEmpty(response) ? ResultMessage.ok() : ResultMessage.ok(response);
     }
 
 }

--
Gitblit v1.8.0