| | |
| | | } |
| | | Map<String, Object> cruiserInFo = historySecondCruiserService.getCruiserInFo(params); |
| | | |
| | | return ObjectUtils.isEmpty(cruiserInFo)? ResultMessage.ok() : ResultMessage.ok(cruiserInFo); |
| | | return ObjectUtils.isEmpty(cruiserInFo)? ResultMessage.ok(ResponseCodeEnum.DEVICE_IS_NULL.getMsg()) : ResultMessage.ok(cruiserInFo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @GetMapping("getCruiserCompare") |
| | | @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"), |
| | | @ApiImplicitParam(name = "time1", value = "时间,2021-08-18", required = true, paramType = "query", dataType = "String"), |
| | | @ApiImplicitParam(name = "time2", value = "时间,2021-08-18", required = true, paramType = "query", dataType = "String") |
| | | }) |
| | | public ResultMessage getCruiserCompare(HttpServletRequest request){ |
| | | Map<String, Object> params = WebUtils.getParametersStartingWith(request, null); |
| | | if (!params.containsKey("mac") || !params.containsKey("time1")|| !params.containsKey("time2")) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | Map<String, Object> cruiserInFo = historySecondCruiserService.getCruiserCompare(params); |
| | | |
| | | return ObjectUtils.isEmpty(cruiserInFo)? ResultMessage.ok(ResponseCodeEnum.DEVICE_IS_NULL.getMsg()) : ResultMessage.ok(cruiserInFo); |
| | | } |
| | | |
| | | } |