Commit 3c1c3aae3fb48c2463d74bf7d2ef857782996ee1
1 parent
f28f78a7
feat: 设备配置编辑异常
1、设备配置编辑时没有增删告警配置报服务器异常问题
Showing
1 changed file
with
3 additions
and
1 deletions
... | ... | @@ -84,7 +84,9 @@ public class YtDeviceProfileServiceImpl |
84 | 84 | alarmProfileMapper.insert(alarmProfile); |
85 | 85 | } |
86 | 86 | }); |
87 | - Optional.ofNullable(oldIds).ifPresent(item -> alarmProfileMapper.deleteBatchIds(item)); | |
87 | + if(!oldIds.isEmpty()){ | |
88 | + alarmProfileMapper.deleteBatchIds(oldIds); | |
89 | + } | |
88 | 90 | return deviceProfileDTO; |
89 | 91 | } |
90 | 92 | ... | ... |