feat:调整空域分组详情新增接口

This commit is contained in:
gyb 2026-02-25 16:38:55 +08:00
parent cc1f539a82
commit 40645de69c
1 changed files with 14 additions and 1 deletions

View File

@ -59,7 +59,20 @@ public class AirlineAreaControllerConvert extends BaseConvert<AirlineAreaDTO, Ai
vo.setAreaType(dto.getAreaType());
vo.setStatus(dto.getStatus());
vo.setRemark(dto.getRemark());
// 这里不需要将字符串转换为 List<PointInfo>因为通常是从前端到后端的转换
// 将字符串转换为 List<PointInfo>
if (dto.getPoints() != null && !dto.getPoints().isEmpty()) {
try {
List<AirlineAreaVO.PointInfo> pointsList = objectMapper.readValue(
dto.getPoints(),
objectMapper.getTypeFactory().constructCollectionType(List.class, AirlineAreaVO.PointInfo.class)
);
vo.setPoints(pointsList);
} catch (JsonProcessingException e) {
log.error("转换坐标点信息失败: {}", e.getMessage());
}
}
return vo;
}