|
|
@@ -213,11 +213,11 @@ public class ScheduledService {
|
|
|
logger.info("查询accesstoken返回结果:"+accessToken);
|
|
|
List<Devices> devicesList = devicesService.list(new QueryWrapper<>());
|
|
|
for (Devices devices:devicesList){
|
|
|
- String[] arr=devices.getDeviceSerial().split(",");
|
|
|
- if (arr==null||arr.length<1){
|
|
|
+ if (devices.getDeviceSerial()==null||devices.getDeviceSerial().length()<1){
|
|
|
continue;
|
|
|
}
|
|
|
- StringBuffer picbuffer=new StringBuffer();
|
|
|
+ String[] arr=devices.getDeviceSerial().split(",");
|
|
|
+ StringBuffer picbuffer=new StringBuffer(devices.getPicture());
|
|
|
for (int i = 0; i <arr.length ; i++) {
|
|
|
String requestUrl=url+"/index/api/addStreamProxy?secret="+accessToken+
|
|
|
"&vhost="+"http://nyfc.chuanghai-tech.com/liveStream"+"&app=live" +
|
|
|
@@ -230,6 +230,7 @@ public class ScheduledService {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
String status = String.valueOf(jsonObject.get("code"));
|
|
|
if("0".equals(status)){
|
|
|
+ picbuffer=new StringBuffer();
|
|
|
String picUrl =jsonObject.getJSONObject("data").getString("key")+".live.mp4";
|
|
|
if (i!=0){
|
|
|
picbuffer.append(",");
|