|
|
@@ -784,6 +784,26 @@ public class EmsModelServiceImpl implements EmsModelService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void unbindSpaceGateways(Long spaceId, List<String> gatewayUuids) {
|
|
|
+ if (spaceId == null || gatewayUuids == null || gatewayUuids.isEmpty()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Set<String> normalizedUuids = gatewayUuids.stream()
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .map(String::trim)
|
|
|
+ .filter(s -> !s.isEmpty())
|
|
|
+ .collect(Collectors.toCollection(LinkedHashSet::new));
|
|
|
+ if (normalizedUuids.isEmpty()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ baseSpaceGatewayMapper.delete(new LambdaQueryWrapper<BaseSpaceGateway>()
|
|
|
+ .eq(BaseSpaceGateway::getSpaceId, spaceId)
|
|
|
+ .in(BaseSpaceGateway::getGatewayUuid, normalizedUuids));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<DmpGatewayDetailResponse> getGatewayListBySpaceId(Long spaceId) {
|
|
|
if (spaceId == null) {
|