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 79a32bda
authored
Apr 25, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]pulsar消费服务
1 parent
7f22d3b5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
11 deletions
src/main/java/cn/com/glsx/consumer/common/Contants.java
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/InfoService.java
src/main/java/cn/com/glsx/consumer/common/Contants.java
View file @
79a32bd
...
@@ -9,12 +9,7 @@ public class Contants {
...
@@ -9,12 +9,7 @@ public class Contants {
public
static
final
int
STATUS_APPEAR
=
4
;
public
static
final
int
STATUS_APPEAR
=
4
;
public
static
final
int
event_APPEAR
=
20
;
public
static
final
int
event_APPEAR
=
20
;
public
static
final
int
SCENE_CONDITION_ALL
=
2
;
public
static
final
int
SCENE_CONDITION_ALL
=
2
;
public
static
final
int
SCENE_CONDITION_ANY
=
1
;
public
static
final
String
MSG_TYPE_RESOURCE
=
"resource"
;
public
static
final
String
MSG_TYPE_RESOURCE
=
"resource"
;
public
static
final
String
MSG_TYPE_DEIVCE
=
"device"
;
public
static
final
String
MSG_TYPE_DEIVCE
=
"device"
;
public
static
final
String
GATEWAY_BIND
=
"gateway_bind"
;
public
static
final
String
SUBDEVICE_BIND
=
"subdevice_bind"
;
public
static
final
String
GATEWAY_UNBIND
=
"gateway_unbind"
;
public
static
final
String
SUBDEVICE_UNBIND
=
"subdevice_unbind"
;
public
static
final
String
SCENE_STATUS
=
"scene_status"
;
public
static
final
String
SCENE_STATUS
=
"scene_status"
;
}
}
src/main/java/cn/com/glsx/consumer/entity/DeviceVo.java
View file @
79a32bd
package
cn
.
com
.
glsx
.
consumer
.
entity
;
package
cn
.
com
.
glsx
.
consumer
.
entity
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.web.servlet.view.InternalResourceViewResolver
;
/**
/**
* @author zhouhaibao
* @author zhouhaibao
...
@@ -11,7 +12,7 @@ public class DeviceVo {
...
@@ -11,7 +12,7 @@ public class DeviceVo {
private
String
deviceId
;
private
String
deviceId
;
private
String
platformProductId
;
private
String
platformProductId
;
private
String
channel
;
private
Integer
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 @
79a32bd
...
@@ -54,7 +54,7 @@ public class DeviceEventService {
...
@@ -54,7 +54,7 @@ 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
.
setChannel
(
"access_platform_aqara"
);
deviceVo
.
setChannel
(
2
);
deviceVo
.
setPlatformProductId
(
index
.
getModel
());
deviceVo
.
setPlatformProductId
(
index
.
getModel
());
deviceVo
.
setUid
(
index
.
getOpenId
());
deviceVo
.
setUid
(
index
.
getOpenId
());
deviceVo
.
setDeviceName
(
index
.
getName
());
deviceVo
.
setDeviceName
(
index
.
getName
());
...
...
src/main/java/cn/com/glsx/consumer/service/InfoService.java
View file @
79a32bd
...
@@ -22,18 +22,15 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -22,18 +22,15 @@ import com.alibaba.fastjson.JSONObject;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Case
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
sun.misc.Cache
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -250,7 +247,7 @@ public class InfoService {
...
@@ -250,7 +247,7 @@ public class InfoService {
deviceVo
.
setDeviceName
(
bizData
.
getName
());
deviceVo
.
setDeviceName
(
bizData
.
getName
());
deviceVo
.
setUid
(
bizData
.
getUid
());
deviceVo
.
setUid
(
bizData
.
getUid
());
deviceVo
.
setPlatformProductId
(
deviceEvent
.
getProductKey
());
deviceVo
.
setPlatformProductId
(
deviceEvent
.
getProductKey
());
deviceVo
.
setChannel
(
"access_platform_tuya"
);
deviceVo
.
setChannel
(
1
);
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