|  |  |  | 
|---|
|  |  |  | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Integer integer = manageCoordinateDetailService.insertCoordinate(params); | 
|---|
|  |  |  | if (integer==null){ | 
|---|
|  |  |  | if (integer==1){ | 
|---|
|  |  |  | return ResultMessage.ok("经纬度已存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (integer==2){ | 
|---|
|  |  |  | return ResultMessage.ok("经纬度不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ResultMessage.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParam(name = "time2", value = "时间,2021-08-18", required = true, paramType = "query", dataType = "String") | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ResultMessage  getInserts(@RequestBody Map<String,Object> params){ | 
|---|
|  |  |  | if (!params.containsKey("coordinateId") || !params.containsKey("time1")|| !params.containsKey("time2")) { | 
|---|
|  |  |  | if (!params.containsKey("coordinateId")) { | 
|---|
|  |  |  | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | Integer integer = manageCoordinateDetailService.batchAll(params); | 
|---|
|  |  |  | if (integer!=200){ | 
|---|
|  |  |  | return ResultMessage.ok("操作失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ResultMessage.ok(integer); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除经纬度点 | 
|---|
|  |  |  | * @param id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("delete") | 
|---|
|  |  |  | public ResultMessage delete(Integer id){ | 
|---|
|  |  |  | if (id==null){ | 
|---|
|  |  |  | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | manageCoordinateDetailService.deleteCoordinate(id); | 
|---|
|  |  |  | return ResultMessage.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParam(name = "time2", value = "时间,2021-08-18", required = true, paramType = "query", dataType = "String") | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ResultMessage selectAll(@RequestBody Map<String,Object> params){ | 
|---|
|  |  |  | if (!params.containsKey("coordinateId") || !params.containsKey("time1")|| !params.containsKey("time2")) { | 
|---|
|  |  |  | if (!params.containsKey("coordinateId") || !params.containsKey("time1")|| !params.containsKey("time2")|| !params.containsKey("mac")) { | 
|---|
|  |  |  | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Map<String,Object> rsMap = manageCoordinateDetailService.selectCoordinate(params); | 
|---|
|  |  |  | return ResultMessage.ok(rsMap); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("queryAll") | 
|---|
|  |  |  | @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 queryAll(@RequestBody Map<String,Object> params){ | 
|---|
|  |  |  | manageCoordinateDetailService.queryAll(params); | 
|---|
|  |  |  | return ResultMessage.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|