修复字典取值,修复会议室不关联设备报错

This commit is contained in:
zjf committed 2025-10-10 15:37:00 +08:00
1 parent 199b23b9af
commit cfdaeea133
3 files changed
+12 -2

No files matched your search

@@ -194,7 +194,7 @@ public class FeedbackController {
List<FeedbackTypeVO> voList = dictResult.getData().stream().map(item -> {
FeedbackTypeVO vo = new FeedbackTypeVO();
vo.setId(item.getId());
vo.setId(item.getItemValue());
vo.setLabel(item.getLabel());
return vo;
}).collect(Collectors.toList());
@@ -205,12 +205,22 @@ public class MeetingRoomServiceImpl extends ServiceImpl<MeetingRoomMapper, Meeti
queryWrapper.in(MeetingRoomEquipmentEntity::getRoomId, roomIds);
List<MeetingRoomEquipmentEntity> equipmentList = meetingRoomEquipmentMapper.selectList(queryWrapper);
// 如果没有任何设备关联记录,直接返回空Map
if (CollectionUtils.isEmpty(equipmentList)) {
return Collections.emptyMap();
}
// 2. 查询设备详细信息
List<Long> equipIds = equipmentList.stream()
.map(MeetingRoomEquipmentEntity::getEquipId)
.distinct()
.collect(Collectors.toList());
// 如果设备ID列表为空,也直接返回空Map
if (CollectionUtils.isEmpty(equipIds)) {
return Collections.emptyMap();
}
Map<Long, MeetingEquipmentEntity> equipmentInfoMap = meetingEquipmentMapper.selectBatchIds(equipIds)
.stream()
.collect(Collectors.toMap(MeetingEquipmentEntity::getId, e -> e));
@@ -21,7 +21,7 @@ public class FeedbackTypeVO implements Serializable {
* 字典项ID
*/
@Schema(description = "字典项ID")
private Long id;
private String id;
/**
* 标签名称