高德返回格式修改

This commit is contained in:
yuhan_jiang 2022-11-25 19:33:12 +08:00
parent eff1640681
commit 657b3ac904
1 changed files with 2 additions and 2 deletions

View File

@ -109,11 +109,11 @@ public class GaodeController {
Map data = (Map) forObject.get("data"); Map data = (Map) forObject.get("data");
if (data != null) { if (data != null) {
Map indexData = (Map) data.get("index_data"); Map indexData = (Map) data.get("index_data");
List<Integer> query = (List) indexData.get("query"); List<Map> query = (List) indexData.get("query");
if (query != null && query.size() == 1) { if (query != null && query.size() == 1) {
CrowdFlow crowdFlow = new CrowdFlow(); CrowdFlow crowdFlow = new CrowdFlow();
crowdFlow.setCaptureTime(currentDate); crowdFlow.setCaptureTime(currentDate);
crowdFlow.setCnt(query.get(0)); crowdFlow.setCnt((Integer) query.get(0).get("index"));
crowdFlowMapper.insert(crowdFlow); crowdFlowMapper.insert(crowdFlow);
} }
} }