feat:提交标注代码
This commit is contained in:
parent
cac50ce393
commit
755cd26ddb
|
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue