Commit 2673fbb0bf7af6405c544cc8a56f17d03018c59a
Merge branch 'wvp-28181-2.0' into main-dev
# Conflicts: # src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java # src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
Showing
1 changed file
with
4 additions
and
15 deletions
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
| ... | ... | @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.*; |
| 6 | 6 | import com.genersoft.iot.vmp.gb28181.event.EventPublisher; |
| 7 | 7 | import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent; |
| 8 | 8 | import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; |
| 9 | +import com.genersoft.iot.vmp.service.IGbStreamService; | |
| 9 | 10 | import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; |
| 10 | 11 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 11 | 12 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| ... | ... | @@ -74,7 +75,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 74 | 75 | private PlatformChannelMapper platformChannelMapper; |
| 75 | 76 | |
| 76 | 77 | @Autowired |
| 77 | - private PlatformCatalogMapper platformCatalogMapper; | |
| 78 | + private PlatformCatalogMapper platformCatalogMapper; | |
| 78 | 79 | |
| 79 | 80 | @Autowired |
| 80 | 81 | private StreamProxyMapper streamProxyMapper; |
| ... | ... | @@ -163,7 +164,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 163 | 164 | } |
| 164 | 165 | } |
| 165 | 166 | } |
| 166 | - if (channels.size() > 0) { | |
| 167 | + if (!channels.isEmpty()) { | |
| 167 | 168 | for (DeviceChannel channel : channels) { |
| 168 | 169 | if (subContMap.get(channel.getChannelId()) != null){ |
| 169 | 170 | Integer count = subContMap.get(channel.getChannelId()); |
| ... | ... | @@ -184,19 +185,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 184 | 185 | } |
| 185 | 186 | try { |
| 186 | 187 | int limitCount = 50; |
| 187 | - int cleanChannelsResult = 0; | |
| 188 | - if (channels.size() > limitCount) { | |
| 189 | - for (int i = 0; i < channels.size(); i += limitCount) { | |
| 190 | - int toIndex = i + limitCount; | |
| 191 | - if (i + limitCount > channels.size()) { | |
| 192 | - toIndex = channels.size(); | |
| 193 | - } | |
| 194 | - cleanChannelsResult += this.deviceChannelMapper.cleanChannelsNotInList(deviceId, channels.subList(i, toIndex)); | |
| 195 | - } | |
| 196 | - } else { | |
| 197 | - cleanChannelsResult = this.deviceChannelMapper.cleanChannelsNotInList(deviceId, channels); | |
| 198 | - } | |
| 199 | - boolean result = cleanChannelsResult < 0; | |
| 188 | + boolean result = false; | |
| 200 | 189 | if (!result && addChannels.size() > 0) { |
| 201 | 190 | if (addChannels.size() > limitCount) { |
| 202 | 191 | for (int i = 0; i < addChannels.size(); i += limitCount) { | ... | ... |