Commit 2673fbb0bf7af6405c544cc8a56f17d03018c59a

Authored by 648540858
2 parents 7443f2b1 78f628dd

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
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
@@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.*; @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.*;
6 import com.genersoft.iot.vmp.gb28181.event.EventPublisher; 6 import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
7 import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent; 7 import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
8 import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; 8 import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
  9 +import com.genersoft.iot.vmp.service.IGbStreamService;
9 import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; 10 import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
10 import com.genersoft.iot.vmp.storager.IRedisCatchStorage; 11 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
11 import com.genersoft.iot.vmp.storager.IVideoManagerStorage; 12 import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
@@ -74,7 +75,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { @@ -74,7 +75,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
74 private PlatformChannelMapper platformChannelMapper; 75 private PlatformChannelMapper platformChannelMapper;
75 76
76 @Autowired 77 @Autowired
77 - private PlatformCatalogMapper platformCatalogMapper; 78 + private PlatformCatalogMapper platformCatalogMapper;
78 79
79 @Autowired 80 @Autowired
80 private StreamProxyMapper streamProxyMapper; 81 private StreamProxyMapper streamProxyMapper;
@@ -163,7 +164,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { @@ -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 for (DeviceChannel channel : channels) { 168 for (DeviceChannel channel : channels) {
168 if (subContMap.get(channel.getChannelId()) != null){ 169 if (subContMap.get(channel.getChannelId()) != null){
169 Integer count = subContMap.get(channel.getChannelId()); 170 Integer count = subContMap.get(channel.getChannelId());
@@ -184,19 +185,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { @@ -184,19 +185,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
184 } 185 }
185 try { 186 try {
186 int limitCount = 50; 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 if (!result && addChannels.size() > 0) { 189 if (!result && addChannels.size() > 0) {
201 if (addChannels.size() > limitCount) { 190 if (addChannels.size() > limitCount) {
202 for (int i = 0; i < addChannels.size(); i += limitCount) { 191 for (int i = 0; i < addChannels.size(); i += limitCount) {