|
|
|
@@ -78,9 +78,9 @@ public class DmH5ConfigServiceImpl extends BaseServiceImpl<DmH5ConfigQuery, DmH5 |
|
|
|
try { |
|
|
|
String property = nacosConfigManager.getConfigService().getConfig(item.getName(), NacosConstants.DEFAULT_GROUP, 5000); |
|
|
|
JSONObject jo = JSON.parseObject(property); |
|
|
|
if (jo.containsKey("system")) { |
|
|
|
if (jo != null && jo.containsKey("system")) { |
|
|
|
JSONObject sys = jo.getJSONObject("system"); |
|
|
|
if (sys.containsKey("H5")) { |
|
|
|
if (sys != null && sys.containsKey("H5")) { |
|
|
|
JSONObject H5 = sys.getJSONObject("H5"); |
|
|
|
H5.put("streamUrl", streamUrl); |
|
|
|
} |
|
|
|
@@ -144,9 +144,9 @@ public class DmH5ConfigServiceImpl extends BaseServiceImpl<DmH5ConfigQuery, DmH5 |
|
|
|
try { |
|
|
|
String property = nacosConfigManager.getConfigService().getConfig(dto.getName(), NacosConstants.DEFAULT_GROUP, 5000); |
|
|
|
JSONObject jo = JSON.parseObject(property); |
|
|
|
if (jo.containsKey("system")) { |
|
|
|
if (jo != null && jo.containsKey("system")) { |
|
|
|
JSONObject sys = jo.getJSONObject("system"); |
|
|
|
if (sys.containsKey("H5")) { |
|
|
|
if (sys != null && sys.containsKey("H5")) { |
|
|
|
JSONObject H5 = sys.getJSONObject("H5"); |
|
|
|
String streamUrl = H5.getString("streamUrl"); |
|
|
|
target.setStreamUrl(streamUrl); |
|
|
|
@@ -178,20 +178,16 @@ public class DmH5ConfigServiceImpl extends BaseServiceImpl<DmH5ConfigQuery, DmH5 |
|
|
|
List<DmManDeviceDto> mdList = dmManDeviceManager.selectList(query); |
|
|
|
if (mdList != null && mdList.size() > 0) { |
|
|
|
DmManDeviceDto target = mdList.get(0); |
|
|
|
try { |
|
|
|
String property = nacosConfigManager.getConfigService().getConfig(dto.getName(), NacosConstants.DEFAULT_GROUP, 5000); |
|
|
|
JSONObject jo = JSON.parseObject(property); |
|
|
|
if (jo.containsKey("system")) { |
|
|
|
JSONObject sys = jo.getJSONObject("system"); |
|
|
|
if (sys.containsKey("H5")) { |
|
|
|
JSONObject H5 = sys.getJSONObject("H5"); |
|
|
|
String streamUrl = H5.getString("streamUrl"); |
|
|
|
target.setStreamUrl(streamUrl); |
|
|
|
dmManDeviceManager.update(target); |
|
|
|
} |
|
|
|
String property = dto.getProperty(); |
|
|
|
JSONObject jo = JSON.parseObject(property); |
|
|
|
if (jo != null && jo.containsKey("system")) { |
|
|
|
JSONObject sys = jo.getJSONObject("system"); |
|
|
|
if (sys != null && sys.containsKey("H5")) { |
|
|
|
JSONObject H5 = sys.getJSONObject("H5"); |
|
|
|
String streamUrl = H5.getString("streamUrl"); |
|
|
|
target.setStreamUrl(streamUrl); |
|
|
|
dmManDeviceManager.update(target); |
|
|
|
} |
|
|
|
} catch (NacosException ne) { |
|
|
|
log.error("H5配置表上传nacos-更新配置文件失败:{}", ne.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
return super.update(dto); |
|
|
|
@@ -226,9 +222,9 @@ public class DmH5ConfigServiceImpl extends BaseServiceImpl<DmH5ConfigQuery, DmH5 |
|
|
|
return null; |
|
|
|
} |
|
|
|
JSONObject jo = JSON.parseObject(result); |
|
|
|
if (jo.containsKey("system")) { |
|
|
|
if (jo != null && jo.containsKey("system")) { |
|
|
|
JSONObject sys = jo.getJSONObject("system"); |
|
|
|
if (sys.containsKey("H5")) { |
|
|
|
if (sys != null && sys.containsKey("H5")) { |
|
|
|
JSONObject H5 = sys.getJSONObject("H5"); |
|
|
|
H5.put("streamUrl", streamUrl); |
|
|
|
} |
|
|
|
@@ -268,9 +264,9 @@ public class DmH5ConfigServiceImpl extends BaseServiceImpl<DmH5ConfigQuery, DmH5 |
|
|
|
String streamUrl = extList.get(0).getStreamUrl(); |
|
|
|
if (!StringUtils.isEmpty(streamUrl)) { |
|
|
|
JSONObject jo = JSON.parseObject(result); |
|
|
|
if (jo.containsKey("system")) { |
|
|
|
if (jo != null && jo.containsKey("system")) { |
|
|
|
JSONObject sys = jo.getJSONObject("system"); |
|
|
|
if (sys.containsKey("H5")) { |
|
|
|
if (sys != null && sys.containsKey("H5")) { |
|
|
|
JSONObject H5 = sys.getJSONObject("H5"); |
|
|
|
H5.put("streamUrl", streamUrl); |
|
|
|
} |
|
|
|
|