| 123456789101112131415161718 |
- package com.fdkankan.contro.util;
- import com.alibaba.fastjson.JSONObject;
- import com.fdkankan.common.constant.CommonStatus;
- import com.fdkankan.contro.constant.ScenePlugin;
- public class ScenePluginUtil {
- public static boolean hasOBPlugin(JSONObject dataFdage) {
- return dataFdage.getJSONArray("plugin")
- .stream()
- .map(obj -> ((JSONObject) obj).getString("name"))
- .anyMatch(name -> name != null && name.startsWith(ScenePlugin.OB.code()))//新的app版本是以数组元素的结构记录插件
- || dataFdage.getIntValue("zxState") == CommonStatus.YES.code().intValue();//旧版本app以zxState字段标识是否使用了知像光电插件
- }
- }
|