Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-rest-admin-job-archetype
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d7f4887b
authored
Mar 30, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.触发条件value,修复json解析反斜杠问题
1 parent
06a401a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
glsx-rest-admin-job/src/main/java/cn/com/glsx/smartdevice/service/SceneService.java
glsx-rest-admin-job/src/main/java/cn/com/glsx/smartdevice/service/SceneService.java
View file @
d7f4887
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment