Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-smart-message-channel
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 7f22d3b5
authored
Apr 25, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]pulsar消费服务
1 parent
a79556b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
9 deletions
pom.xml
src/main/java/cn/com/glsx/consumer/entity/DeviceVo.java
src/main/java/cn/com/glsx/consumer/service/DeviceEventService.java
src/main/java/cn/com/glsx/consumer/service/DeviceService.java
src/main/java/cn/com/glsx/consumer/service/InfoService.java
pom.xml
View file @
7f22d3b
...
@@ -71,6 +71,11 @@
...
@@ -71,6 +71,11 @@
<artifactId>
rest-admin-redis
</artifactId>
<artifactId>
rest-admin-redis
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<version>
2.1.3.RELEASE
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
src/main/java/cn/com/glsx/consumer/entity/DeviceVo.java
View file @
7f22d3b
...
@@ -10,8 +10,8 @@ import lombok.Data;
...
@@ -10,8 +10,8 @@ import lombok.Data;
public
class
DeviceVo
{
public
class
DeviceVo
{
private
String
deviceId
;
private
String
deviceId
;
private
String
productId
;
private
String
p
latformP
roductId
;
private
String
resource
;
private
String
channel
;
private
String
uid
;
private
String
uid
;
private
String
time
;
private
String
time
;
private
String
parentId
;
private
String
parentId
;
...
...
src/main/java/cn/com/glsx/consumer/service/DeviceEventService.java
View file @
7f22d3b
...
@@ -54,8 +54,8 @@ public class DeviceEventService {
...
@@ -54,8 +54,8 @@ public class DeviceEventService {
DeviceVo
deviceVo
=
new
DeviceVo
();
DeviceVo
deviceVo
=
new
DeviceVo
();
deviceVo
.
setDeviceId
(
index
.
getDid
());
deviceVo
.
setDeviceId
(
index
.
getDid
());
deviceVo
.
setParentId
(
index
.
getParentId
());
deviceVo
.
setParentId
(
index
.
getParentId
());
deviceVo
.
set
Resource
(
"access_platform_aqara"
);
deviceVo
.
set
Channel
(
"access_platform_aqara"
);
deviceVo
.
setProductId
(
index
.
getModel
());
deviceVo
.
setP
latformP
roductId
(
index
.
getModel
());
deviceVo
.
setUid
(
index
.
getOpenId
());
deviceVo
.
setUid
(
index
.
getOpenId
());
deviceVo
.
setDeviceName
(
index
.
getName
());
deviceVo
.
setDeviceName
(
index
.
getName
());
return
deviceVo
;
return
deviceVo
;
...
...
src/main/java/cn/com/glsx/consumer/service/DeviceService.java
View file @
7f22d3b
...
@@ -5,9 +5,15 @@ import cn.com.glsx.consumer.utils.HttpUtil;
...
@@ -5,9 +5,15 @@ import cn.com.glsx.consumer.utils.HttpUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
/**
/**
* @author zhouhaibao
* @author zhouhaibao
...
...
src/main/java/cn/com/glsx/consumer/service/InfoService.java
View file @
7f22d3b
...
@@ -144,11 +144,11 @@ public class InfoService {
...
@@ -144,11 +144,11 @@ public class InfoService {
smartDevideStatus
=
new
SmartDevideStatus
();
smartDevideStatus
=
new
SmartDevideStatus
();
smartDevideStatus
.
setDeviceId
(
deviceStatus
.
getDevId
());
smartDevideStatus
.
setDeviceId
(
deviceStatus
.
getDevId
());
smartDevideStatus
.
setProductKey
(
deviceStatus
.
getProductKey
());
smartDevideStatus
.
setProductKey
(
deviceStatus
.
getProductKey
());
smartDevideStatus
.
setCreatetime
(
new
Date
(
index
.
getT
()
));
smartDevideStatus
.
setCreatetime
(
new
Date
());
smartDevideStatus
.
setUpdatetime
(
new
Date
(
index
.
getT
()
));
smartDevideStatus
.
setUpdatetime
(
new
Date
());
smartDevideStatus
.
setDeviceOrderCode
(
index
.
getCode
());
smartDevideStatus
.
setDeviceOrderCode
(
index
.
getCode
());
}
}
smartDevideStatus
.
setUpdatetime
(
new
Date
(
index
.
getT
()
));
smartDevideStatus
.
setUpdatetime
(
new
Date
());
smartDevideStatus
.
setDeviceOrderValue
(
index
.
getValue
());
smartDevideStatus
.
setDeviceOrderValue
(
index
.
getValue
());
list
.
add
(
smartDevideStatus
);
list
.
add
(
smartDevideStatus
);
});
});
...
@@ -249,8 +249,8 @@ public class InfoService {
...
@@ -249,8 +249,8 @@ public class InfoService {
DeviceEventDetail
bizData
=
deviceEvent
.
getBizData
();
DeviceEventDetail
bizData
=
deviceEvent
.
getBizData
();
deviceVo
.
setDeviceName
(
bizData
.
getName
());
deviceVo
.
setDeviceName
(
bizData
.
getName
());
deviceVo
.
setUid
(
bizData
.
getUid
());
deviceVo
.
setUid
(
bizData
.
getUid
());
deviceVo
.
setProductId
(
deviceEvent
.
getProductKey
());
deviceVo
.
setP
latformP
roductId
(
deviceEvent
.
getProductKey
());
deviceVo
.
set
Resource
(
"access_platform_tuya"
);
deviceVo
.
set
Channel
(
"access_platform_tuya"
);
deviceVo
.
setDeviceId
(
bizData
.
getDevId
());
deviceVo
.
setDeviceId
(
bizData
.
getDevId
());
return
deviceVo
;
return
deviceVo
;
}
}
...
...
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