|
@@ -73,6 +73,7 @@ public class CheckUtil {
|
|
|
|
|
|
public static void getPropertyBefore_query(Repository Repository, SceneProperty sceneProperty, List<SceneProperty> result) throws Exception {
|
|
|
JSONObject sql_json = JSON.parseObject(sceneProperty.query_sql);
|
|
|
+ // 查询目标中的引用为true,其他引用为false
|
|
|
Map<String, Boolean> refList = new HashMap<String, Boolean>();
|
|
|
query(sql_json, refList);
|
|
|
for (String refString : refList.keySet()) {
|
|
@@ -128,6 +129,7 @@ public class CheckUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 往下找一级
|
|
|
private static List<SceneProperty> getProperty(SceneObject parentData, String[] splits, int splits_index, boolean refInTarget) throws Exception {
|
|
|
String name = splits[splits_index];
|
|
|
SceneProperty findSP = null;
|
|
@@ -145,11 +147,13 @@ public class CheckUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 根据当前所处parent级别获取依赖属性
|
|
|
private static List<SceneProperty> getProperty(SceneProperty parentData, String[] splits, int splits_index, boolean refInTarget)
|
|
|
throws Exception {
|
|
|
List<SceneProperty> result = new ArrayList<SceneProperty>();
|
|
|
- boolean doit = true;
|
|
|
+ boolean valid_find = true;
|
|
|
if (parentData.propertyValueType.equals("static") && parentData.propertyValueSchema.equals("JSONArray")) {
|
|
|
+ // 静态数组根据是否有匹配,找下一级Object的对应属性
|
|
|
String split = splits[splits_index];
|
|
|
int index_ = split.indexOf('=');
|
|
|
if (index_ != -1) {
|
|
@@ -178,8 +182,10 @@ public class CheckUtil {
|
|
|
}
|
|
|
}
|
|
|
} else if (parentData.propertyValueType.equals("deamon")) {
|
|
|
+ valid_find = false;
|
|
|
result.add(parentData);
|
|
|
} else if (splits_index == splits.length) {
|
|
|
+ valid_find = false;
|
|
|
result.add(parentData);
|
|
|
} else {
|
|
|
String name = splits[splits_index];
|
|
@@ -207,14 +213,14 @@ public class CheckUtil {
|
|
|
if (sp_custom != null) {
|
|
|
result = getProperty(sp_custom, splits, splits_index + 1, refInTarget);
|
|
|
} else if (parentData.propertyValueType.equals("query") && splits_index == splits.length - 1) {
|
|
|
- doit = false;
|
|
|
+ valid_find = false;
|
|
|
result.add(parentData);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // throw new Exception();
|
|
|
- if (doit && refInTarget && splits_index + 1 == splits.length) {
|
|
|
+ // 查询目标中有引用的,需要增加引用项下级的附加属性(query类型的原始值)
|
|
|
+ if (valid_find && refInTarget && splits_index + 1 == splits.length) {
|
|
|
List<SceneProperty> tmpList = new ArrayList<SceneProperty>();
|
|
|
for (SceneProperty spTmp : result) {
|
|
|
if (spTmp.query_attached != null) {
|