feat:提交标注代码,调整逻辑
This commit is contained in:
parent
395397fedc
commit
1be9f626a0
|
|
@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -87,22 +88,22 @@ public class AirlineMarkerServiceImpl implements IAirlineMarkerService {
|
|||
|
||||
@Override
|
||||
public List<AirlineMarkerDTO> selectMarkerList(AirlineMarkerDTO dto) {
|
||||
AirlineMarker model = AirlineMarkerServiceConvert.to(dto);
|
||||
List<AirlineMarker> markers = iAirlineMarkerDomain.selectMarkerList(model);
|
||||
List<AirlineMarkerDTO> dtos = AirlineMarkerServiceConvert.fromList(markers);
|
||||
|
||||
|
||||
AirlineMarkerGroupInfoDTO groupInfoDTO = new AirlineMarkerGroupInfoDTO();
|
||||
groupInfoDTO.setMarkerId(dto.getGroupId());
|
||||
List<AirlineMarkerGroupInfoDTO> groupInfos = iAirlineMarkerGroupInfoService.selectMarkerGroupInfoList(groupInfoDTO);
|
||||
|
||||
List<AirlineMarkerDTO> result = new ArrayList<>();
|
||||
// 为每个标注设置分组ID
|
||||
for (AirlineMarkerDTO markerDto : dtos) {
|
||||
for (AirlineMarkerGroupInfoDTO markerDto : groupInfos) {
|
||||
// 查询分组关系
|
||||
AirlineMarkerGroupInfoDTO groupInfoDTO = new AirlineMarkerGroupInfoDTO();
|
||||
groupInfoDTO.setMarkerId(markerDto.getId());
|
||||
List<AirlineMarkerGroupInfoDTO> groupInfos = iAirlineMarkerGroupInfoService.selectMarkerGroupInfoList(groupInfoDTO);
|
||||
if (!groupInfos.isEmpty()) {
|
||||
markerDto.setGroupId(groupInfos.get(0).getGroupId());
|
||||
}
|
||||
AirlineMarker airlineMarker = iAirlineMarkerDomain.selectMarkerById(markerDto.getMarkerId());
|
||||
AirlineMarkerDTO airlineMarkerDTO = AirlineMarkerServiceConvert.from(airlineMarker);
|
||||
airlineMarkerDTO.setGroupId(groupInfos.get(0).getGroupId());
|
||||
result.add(airlineMarkerDTO);
|
||||
}
|
||||
|
||||
return dtos;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue