feat:提交标注代码

This commit is contained in:
gyb 2026-03-12 15:37:42 +08:00
parent cac50ce393
commit 755cd26ddb
3 changed files with 36 additions and 0 deletions

View File

@ -91,4 +91,18 @@ public class AirlineMarkerController extends BaseController {
dto.setUpdateBy(SecurityUtils.getUserId().toString()); dto.setUpdateBy(SecurityUtils.getUserId().toString());
return toAjax(iAirlineMarkerService.deleteMarker(dto)); return toAjax(iAirlineMarkerService.deleteMarker(dto));
} }
/**
* 按照分组ID查询标注列表
*
* @param groupId 分组ID
* @return 标注列表
*/
@GetMapping("/markerList/{groupId}")
@Operation(summary = "按照分组ID查询标注列表")
public AjaxResult selectMarkerListByGroupId(@PathVariable Long groupId) {
List<AirlineMarkerDTO> dtos = iAirlineMarkerService.selectMarkerListByGroupId(groupId);
List<AirlineMarkerVO> result = AirlineMarkerControllerConvert.fromList(dtos);
return success(result);
}
} }

View File

@ -20,4 +20,6 @@ public interface IAirlineMarkerService {
List<AirlineMarkerDTO> selectMarkerList(AirlineMarkerDTO dto); List<AirlineMarkerDTO> selectMarkerList(AirlineMarkerDTO dto);
AirlineMarkerDTO selectMarkerById(Long id); AirlineMarkerDTO selectMarkerById(Long id);
List<AirlineMarkerDTO> selectMarkerListByGroupId(Long groupId);
} }

View File

@ -106,4 +106,24 @@ public class AirlineMarkerServiceImpl implements IAirlineMarkerService {
return dto; return dto;
} }
@Override
public List<AirlineMarkerDTO> selectMarkerListByGroupId(Long groupId) {
// 通过分组ID查询标注ID列表
List<Long> markerIds = iAirlineMarkerGroupInfoService.selectMarkerIdsByGroupId(groupId);
// 如果没有标注返回空列表
if (markerIds == null || markerIds.isEmpty()) {
return java.util.Collections.emptyList();
}
// 通过标注ID列表查询标注详情
List<AirlineMarker> markers = iAirlineMarkerDomain.selectMarkerListByIds(markerIds);
List<AirlineMarkerDTO> dtos = AirlineMarkerServiceConvert.fromList(markers);
// 为每个标注设置分组ID
dtos.forEach(dto -> dto.setGroupId(groupId));
return dtos;
}
} }