Commit d164d3aa authored by duanruiming's avatar duanruiming

[update] 优化灯态查询逻辑

parent 769f5f4e
...@@ -58,11 +58,8 @@ public class SignalStatusController { ...@@ -58,11 +58,8 @@ public class SignalStatusController {
@ApiResponse(code = 200, message = "OK", response = LightsStatusVO.class) @ApiResponse(code = 200, message = "OK", response = LightsStatusVO.class)
}) })
public JsonViewObject lightStatus() throws Exception { public JsonViewObject lightStatus() throws Exception {
// List<LightsStatusVO> lightsStatusVOList = signalStatusService.lightStatus(); List<LightsStatusVO> lightsStatusVOList = signalStatusService.lightStatus();
List<LightsStatusVO> lightsStatusVOList1 = signalStatusService.lightStatus("12F7L08J8S0"); return JsonViewObject.newInstance().success(lightsStatusVOList);
JsonViewObject jsonViewObject = JsonViewObject.newInstance();
return jsonViewObject.success(lightsStatusVOList1);
} }
} }
...@@ -60,7 +60,7 @@ public class WanJiCommonRunningStatusServiceImpl implements WanJiCommonRunningSt ...@@ -60,7 +60,7 @@ public class WanJiCommonRunningStatusServiceImpl implements WanJiCommonRunningSt
throw new Exception("获取灯态数据远程服务调用异常,异常信息" + jsonViewObject.getMessage()); throw new Exception("获取灯态数据远程服务调用异常,异常信息" + jsonViewObject.getMessage());
} }
ObjectMapper objectMapper = JacksonUtils.getInstance(); ObjectMapper objectMapper = JacksonUtils.getInstance();
result = objectMapper.convertValue(jsonViewObject.getContent(), new TypeReference<List<LightsStatusVO>>() {}); result.addAll(objectMapper.convertValue(jsonViewObject.getContent(), new TypeReference<List<LightsStatusVO>>() {}));
} }
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment