Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
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 0a7e5fdd
authored
Apr 20, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]产品名称修改
1 parent
d05e3b9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
src/main/java/com/glsx/smart/service/impl/SmartSceneServiceImpl.java
src/main/java/com/glsx/smart/service/impl/SmartSceneServiceImpl.java
View file @
0a7e5fd
...
@@ -5,6 +5,7 @@ import cn.com.glsx.didicb.app.model.CarAssistantInfo;
...
@@ -5,6 +5,7 @@ import cn.com.glsx.didicb.app.model.CarAssistantInfo;
import
cn.com.glsx.didicb.app.remote.CarAssistantInfoRemote
;
import
cn.com.glsx.didicb.app.remote.CarAssistantInfoRemote
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.nacos.common.utils.MD5Utils
;
import
com.glsx.smart.dao.entity.SmartDeviceStatus
;
import
com.glsx.smart.dao.entity.SmartDeviceStatus
;
import
com.glsx.smart.dao.entity.SmartScene
;
import
com.glsx.smart.dao.entity.SmartScene
;
import
com.glsx.smart.dao.entity.SmartSceneData
;
import
com.glsx.smart.dao.entity.SmartSceneData
;
...
@@ -276,12 +277,16 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
...
@@ -276,12 +277,16 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
Map
<
String
,
Object
>
map
=
sceneMapper
.
getBySourceAndUserId
(
scene
.
getId
());
Map
<
String
,
Object
>
map
=
sceneMapper
.
getBySourceAndUserId
(
scene
.
getId
());
String
user_id
=
map
.
get
(
"user_id"
)
+
""
;
String
user_id
=
map
.
get
(
"user_id"
)
+
""
;
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
String
source
=
map
.
get
(
"source"
)
+
""
;
paramMap
.
put
(
"alias"
,
user_id
);
paramMap
.
put
(
"alias"
,
user_id
);
paramMap
.
put
(
"deviceType"
,
map
.
get
(
"source"
)
+
""
);
paramMap
.
put
(
"deviceType"
,
map
.
get
(
"source"
)
+
""
);
paramMap
.
put
(
"title"
,
title
);
paramMap
.
put
(
"title"
,
title
);
paramMap
.
put
(
"body"
,
msg
);
paramMap
.
put
(
"body"
,
msg
);
paramMap
.
put
(
"msgBody"
,
msg
);
paramMap
.
put
(
"msgBody"
,
msg
);
saveMegInfo
(
user_id
,
title
,
msg
);
saveMegInfo
(
user_id
,
title
,
msg
);
if
(
StringUtils
.
isEmpty
(
source
)){
return
;
}
try
{
try
{
log
.
info
(
"通知入参{}"
,
JSONObject
.
toJSONString
(
paramMap
));
log
.
info
(
"通知入参{}"
,
JSONObject
.
toJSONString
(
paramMap
));
JSONObject
jsonObject
=
HttpUtil
.
sendPost
(
infoUrl
,
JSONObject
.
toJSONString
(
paramMap
),
new
HashMap
<>());
JSONObject
jsonObject
=
HttpUtil
.
sendPost
(
infoUrl
,
JSONObject
.
toJSONString
(
paramMap
),
new
HashMap
<>());
...
@@ -328,6 +333,7 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
...
@@ -328,6 +333,7 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
Map
<
String
,
Object
>
map
=
sceneMapper
.
getBySourceAndUserId
(
scene
.
getId
());
Map
<
String
,
Object
>
map
=
sceneMapper
.
getBySourceAndUserId
(
scene
.
getId
());
String
user_id
=
map
.
get
(
"user_id"
)
+
""
;
String
user_id
=
map
.
get
(
"user_id"
)
+
""
;
String
scene_name
=
map
.
get
(
"scene_name"
)
+
""
;
String
scene_name
=
map
.
get
(
"scene_name"
)
+
""
;
String
source
=
map
.
get
(
"source"
)
+
""
;
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"alias"
,
user_id
);
paramMap
.
put
(
"alias"
,
user_id
);
paramMap
.
put
(
"deviceType"
,
map
.
get
(
"source"
)
+
""
);
paramMap
.
put
(
"deviceType"
,
map
.
get
(
"source"
)
+
""
);
...
@@ -347,8 +353,10 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
...
@@ -347,8 +353,10 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
String
context
=
buildBody
(
user_id
,
title
,
collect
,
scene
.
getId
(),
scene_name
);
String
context
=
buildBody
(
user_id
,
title
,
collect
,
scene
.
getId
(),
scene_name
);
paramMap
.
put
(
"msgBody"
,
context
);
paramMap
.
put
(
"msgBody"
,
context
);
saveMegInfo
(
user_id
,
title
,
context
);
saveMegInfo
(
user_id
,
title
,
context
);
if
(
StringUtils
.
isEmpty
(
source
)){
return
;
}
try
{
try
{
log
.
info
(
"通知入参{}"
,
JSONObject
.
toJSONString
(
paramMap
));
JSONObject
jsonObject
=
HttpUtil
.
sendPost
(
infoUrl
,
JSONObject
.
toJSONString
(
paramMap
),
new
HashMap
<>());
JSONObject
jsonObject
=
HttpUtil
.
sendPost
(
infoUrl
,
JSONObject
.
toJSONString
(
paramMap
),
new
HashMap
<>());
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
!=
null
)
{
String
code
=
jsonObject
.
get
(
"code"
)
+
""
;
String
code
=
jsonObject
.
get
(
"code"
)
+
""
;
...
@@ -403,4 +411,8 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
...
@@ -403,4 +411,8 @@ public class SmartSceneServiceImpl extends BaseService implements SmartSceneServ
return
context
;
return
context
;
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
MD5Utils
.
md5Hex
(
"13450798972"
,
"utf-8"
));
}
}
}
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