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 30bd6169
authored
Apr 13, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 kafka消息推送测试--think.wang
1 parent
d803b380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
src/main/java/com/glsx/smart/config/DeviceAddressProducer.java
src/main/java/com/glsx/smart/config/DeviceAddressProducer.java
View file @
30bd616
...
@@ -35,13 +35,14 @@ public class DeviceAddressProducer {
...
@@ -35,13 +35,14 @@ public class DeviceAddressProducer {
*/
*/
public
void
pushUserDeviceData
(
String
deviceId
,
String
lngAndLat
,
Integer
value
)
{
public
void
pushUserDeviceData
(
String
deviceId
,
String
lngAndLat
,
Integer
value
)
{
//kafka 发送消息数据封装
//kafka 发送消息数据封装
Fence
.
GpsLoc
gpsLoc
;
String
[]
strArr
;
if
(
value
==
Fence
.
OperationType
.
DEL_VALUE
){
//删除不需要经纬度数据
if
(
value
==
Fence
.
OperationType
.
DEL_VALUE
gpsLoc
=
Fence
.
GpsLoc
.
newBuilder
().
build
();
||
value
==
Fence
.
OperationType
.
GET_VALUE
){
//删除和获取不需要经纬度数据
strArr
=
new
String
[]{
"0"
,
"0"
};
}
else
{
}
else
{
String
[]
strArr
=
lngAndLat
.
split
(
":"
);
strArr
=
lngAndLat
.
split
(
":"
);
gpsLoc
=
this
.
buildGpsLoc
(
strArr
[
0
],
strArr
[
1
]);
}
}
Fence
.
GpsLoc
gpsLoc
=
this
.
buildGpsLoc
(
strArr
[
0
],
strArr
[
1
]);
Fence
.
FenceDeviceFamilyInfo
deviceFamilyInfo
=
this
.
buildFenceDevice
(
deviceId
,
gpsLoc
);
Fence
.
FenceDeviceFamilyInfo
deviceFamilyInfo
=
this
.
buildFenceDevice
(
deviceId
,
gpsLoc
);
Fence
.
OptFamilyFenceInfo
familyFenceInfo
=
this
.
buildFamilyFence
(
value
,
deviceFamilyInfo
);
Fence
.
OptFamilyFenceInfo
familyFenceInfo
=
this
.
buildFamilyFence
(
value
,
deviceFamilyInfo
);
try
{
try
{
...
...
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