Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0
This commit is contained in:
commit
87acd73efc
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.GbStream;
|
import com.genersoft.iot.vmp.gb28181.bean.GbStream;
|
||||||
|
import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.MediaItem;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
||||||
@ -29,6 +30,9 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private StreamPushMapper streamPushMapper;
|
private StreamPushMapper streamPushMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ZLMRESTfulUtils zlmresTfulUtils;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StreamPushItem> handleJSON(String jsonData) {
|
public List<StreamPushItem> handleJSON(String jsonData) {
|
||||||
if (jsonData == null) return null;
|
if (jsonData == null) return null;
|
||||||
@ -84,6 +88,10 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
@Override
|
@Override
|
||||||
public boolean removeFromGB(GbStream stream) {
|
public boolean removeFromGB(GbStream stream) {
|
||||||
int del = gbStreamMapper.del(stream.getApp(), stream.getStream());
|
int del = gbStreamMapper.del(stream.getApp(), stream.getStream());
|
||||||
|
JSONObject mediaList = zlmresTfulUtils.getMediaList(stream.getApp(), stream.getStream());
|
||||||
|
if (mediaList == null) {
|
||||||
|
streamPushMapper.del(stream.getApp(), stream.getStream());
|
||||||
|
}
|
||||||
return del > 0;
|
return del > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user