|
|
@ -19,7 +19,6 @@ import com.bfd.assemble.entity.Constants; |
|
|
|
@Slf4j |
|
|
|
public class DataUtil { |
|
|
|
/** |
|
|
|
* |
|
|
|
* @param key 传入的key |
|
|
|
* @param dataMap 数据map |
|
|
|
* @return 根据传入的参数进行判断解析,返回正确的dataValue |
|
|
@ -27,9 +26,12 @@ public class DataUtil { |
|
|
|
public static Object getValue(String key, Map dataMap) { |
|
|
|
try { |
|
|
|
//公式为空直接就返回 |
|
|
|
if(key.equals(Constants.EMPTY)){ |
|
|
|
if (key.equals(Constants.EMPTY)) { |
|
|
|
return Constants.EMPTY; |
|
|
|
} |
|
|
|
if (!key.contains(Constants.NOT_KEY)) { |
|
|
|
return key; |
|
|
|
} |
|
|
|
Object dataValue; |
|
|
|
String isJson = "#json#"; |
|
|
|
if (key.contains(isJson)) { |
|
|
@ -55,7 +57,7 @@ public class DataUtil { |
|
|
|
return dataValue; |
|
|
|
} catch (Exception e) { |
|
|
|
// TODO: handle exception |
|
|
|
log.error("jsonpath公式取值异常,",e); |
|
|
|
log.error("jsonpath公式取值异常,", e); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|