|
@ -408,6 +408,15 @@ public class DcWarningServiceImpl implements IDcWarningService |
|
|
// return dcWarningMapper.insertDcWarning(dcWarning);//如果没有配置策略直接加入数据库;
|
|
|
// return dcWarningMapper.insertDcWarning(dcWarning);//如果没有配置策略直接加入数据库;
|
|
|
// }
|
|
|
// }
|
|
|
private JSONObject mergeJsonObjects(JSONObject jsonObjectOne, JSONObject jsonObjectTwo){ |
|
|
private JSONObject mergeJsonObjects(JSONObject jsonObjectOne, JSONObject jsonObjectTwo){ |
|
|
|
|
|
if(jsonObjectOne!=null&&jsonObjectTwo==null){ |
|
|
|
|
|
return jsonObjectOne; //两个存在一个为空返回不为空的
|
|
|
|
|
|
} |
|
|
|
|
|
if (jsonObjectOne==null&&jsonObjectTwo!=null){ |
|
|
|
|
|
return jsonObjectTwo;//两个存在一个为空返回不为空的
|
|
|
|
|
|
} |
|
|
|
|
|
if(jsonObjectOne==null&&jsonObjectTwo==null){ |
|
|
|
|
|
return new JSONObject();//两个都为空返回空json
|
|
|
|
|
|
} |
|
|
// 合并videoList
|
|
|
// 合并videoList
|
|
|
if (jsonObjectTwo.has("videoList")) { |
|
|
if (jsonObjectTwo.has("videoList")) { |
|
|
JSONArray videoListTwo = jsonObjectTwo.getJSONArray("videoList"); |
|
|
JSONArray videoListTwo = jsonObjectTwo.getJSONArray("videoList"); |
|
|