Commit 7f22d3b5 by 111-PC\111

[+]pulsar消费服务

1 parent a79556b5
......@@ -71,6 +71,11 @@
<artifactId>rest-admin-redis</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -10,8 +10,8 @@ import lombok.Data;
public class DeviceVo {
private String deviceId;
private String productId;
private String resource;
private String platformProductId;
private String channel;
private String uid;
private String time;
private String parentId;
......
......@@ -54,8 +54,8 @@ public class DeviceEventService {
DeviceVo deviceVo=new DeviceVo();
deviceVo.setDeviceId(index.getDid());
deviceVo.setParentId(index.getParentId());
deviceVo.setResource("access_platform_aqara");
deviceVo.setProductId(index.getModel());
deviceVo.setChannel("access_platform_aqara");
deviceVo.setPlatformProductId(index.getModel());
deviceVo.setUid(index.getOpenId());
deviceVo.setDeviceName(index.getName());
return deviceVo;
......
......@@ -5,9 +5,15 @@ import cn.com.glsx.consumer.utils.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
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.List;
/**
* @author zhouhaibao
......
......@@ -144,11 +144,11 @@ public class InfoService {
smartDevideStatus = new SmartDevideStatus();
smartDevideStatus.setDeviceId(deviceStatus.getDevId());
smartDevideStatus.setProductKey(deviceStatus.getProductKey());
smartDevideStatus.setCreatetime(new Date(index.getT()));
smartDevideStatus.setUpdatetime(new Date(index.getT()));
smartDevideStatus.setCreatetime(new Date());
smartDevideStatus.setUpdatetime(new Date());
smartDevideStatus.setDeviceOrderCode(index.getCode());
}
smartDevideStatus.setUpdatetime(new Date(index.getT()));
smartDevideStatus.setUpdatetime(new Date());
smartDevideStatus.setDeviceOrderValue(index.getValue());
list.add(smartDevideStatus);
});
......@@ -249,8 +249,8 @@ public class InfoService {
DeviceEventDetail bizData = deviceEvent.getBizData();
deviceVo.setDeviceName(bizData.getName());
deviceVo.setUid(bizData.getUid());
deviceVo.setProductId(deviceEvent.getProductKey());
deviceVo.setResource("access_platform_tuya");
deviceVo.setPlatformProductId(deviceEvent.getProductKey());
deviceVo.setChannel("access_platform_tuya");
deviceVo.setDeviceId(bizData.getDevId());
return deviceVo;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!