Commit d7f4887b by fz

1.触发条件value,修复json解析反斜杠问题

1 parent 06a401a4
...@@ -19,6 +19,7 @@ import cn.com.glsx.vasp.modules.mapper.ScenseDataMapper; ...@@ -19,6 +19,7 @@ import cn.com.glsx.vasp.modules.mapper.ScenseDataMapper;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.nacos.common.utils.CollectionUtils; import com.alibaba.nacos.common.utils.CollectionUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -151,7 +152,8 @@ public class SceneService { ...@@ -151,7 +152,8 @@ public class SceneService {
ScenseParamValue paramValue = null; ScenseParamValue paramValue = null;
try { try {
paramValue = JSON.parseObject(value, ScenseParamValue.class); String json = StringEscapeUtils.unescapeJavaScript(value);
paramValue = JSON.parseObject(json, ScenseParamValue.class);
} catch (Exception e) { } catch (Exception e) {
log.info("JSON解析异常:ScenseParamValue===="+e.getMessage()+"===conditionId:"+condition.getId()+"===conditionType:"+conditionType); log.info("JSON解析异常:ScenseParamValue===="+e.getMessage()+"===conditionId:"+condition.getId()+"===conditionType:"+conditionType);
return false; return false;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!