648540858
2024-02-20 a9ab5c28e9fd52c1d936a245ac46c9e556f6bc3e
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java
@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
@@ -27,6 +28,7 @@
 * @author lin
 */
@Service
@DS("master")
public class PlatformChannelServiceImpl implements IPlatformChannelService {
    private final static Logger logger = LoggerFactory.getLogger(PlatformChannelServiceImpl.class);
@@ -165,10 +167,9 @@
            catalogId = null;
        }
        if ((result = platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId)) > 0) {
            List<DeviceChannel> deviceChannels = platformChannelMapper.queryAllChannelInCatalog(platformId, catalogId);
            eventPublisher.catalogEventPublish(platformId, deviceChannels, CatalogEvent.DEL);
        }
        return result;
        List<DeviceChannel> deviceChannels = platformChannelMapper.queryAllChannelInCatalog(platformId, catalogId);
        eventPublisher.catalogEventPublish(platformId, deviceChannels, CatalogEvent.DEL);
        return platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId);
    }
}