瀏覽代碼

修复目录推送的BUG

648540858 1 年之前
父節點
當前提交
160a5d84c3

+ 1 - 1
src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java

@@ -89,7 +89,7 @@ public interface PlatformChannelMapper {
             "FROM " +
             "wvp_platform pp " +
             "left join wvp_platform_gb_channel pgc on " +
-            "pp.server_gb_id = pgc.platform_id " +
+            "pp.id = pgc.platform_id " +
             "left join wvp_device_channel dc on " +
             "dc.id = pgc.device_channel_id " +
             "WHERE " +

+ 8 - 0
src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java

@@ -436,6 +436,14 @@ public class GbChannelServiceImpl implements IGbChannelService {
         }
         // 这个多加一个参数,为了防止将非国标的通道通过此方法清空内容,导致意外发生
         commonGBChannelMapper.reset(id, channel.getGbDeviceDbId(), DateUtil.getNow());
+        CommonGBChannel channelNew = getOne(id);
+        // 发送通过更新通知
+        try {
+            // 发送通知
+            eventPublisher.catalogEventPublish(null, channelNew, CatalogEvent.UPDATE);
+        } catch (Exception e) {
+            log.warn("[通道移除通知] 发送失败,{}", channelNew.getGbDeviceId(), e);
+        }
     }
 
     @Override