Merge pull request 'feat:标注接口返回groupid' (#6) from main-空域查询接口新增groupid into dev
Reviewed-on: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-airline/pulls/6
This commit is contained in:
commit
c6ca0ebd55
|
|
@ -197,8 +197,26 @@ public class AirlineMarkerGroupInfoServiceImpl implements IAirlineMarkerGroupInf
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转换为 DTO 并返回
|
// 获取所有标注分组关系,建立 markerId -> groupId 的映射
|
||||||
return AirlineMarkerServiceConvert.fromList(markers);
|
AirlineMarkerGroupInfo groupInfoQuery = new AirlineMarkerGroupInfo();
|
||||||
|
List<AirlineMarkerGroupInfo> groupInfos = iAirlineMarkerGroupInfoDomain.selectMarkerGroupInfoList(groupInfoQuery);
|
||||||
|
java.util.Map<Long, Long> markerGroupMap = new java.util.HashMap<>();
|
||||||
|
if (groupInfos != null) {
|
||||||
|
for (AirlineMarkerGroupInfo info : groupInfos) {
|
||||||
|
markerGroupMap.put(info.getMarkerId(), info.getGroupId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为 DTO 并设置 groupId
|
||||||
|
java.util.List<AirlineMarkerDTO> result = new java.util.ArrayList<>();
|
||||||
|
for (AirlineMarker marker : markers) {
|
||||||
|
AirlineMarkerDTO dto = AirlineMarkerServiceConvert.from(marker);
|
||||||
|
if (markerGroupMap.containsKey(marker.getId())) {
|
||||||
|
dto.setGroupId(markerGroupMap.get(marker.getId()));
|
||||||
|
}
|
||||||
|
result.add(dto);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue