Commit 79dd3e4a by 111-PC\111

[+]kafka消费数据修改

1 parent 54e2ee6a
...@@ -23,7 +23,8 @@ public class SmartDeviceStatusService { ...@@ -23,7 +23,8 @@ public class SmartDeviceStatusService {
private SceneService sceneService; private SceneService sceneService;
public void saveEvent(Event event) { public void saveEvent(Event event) {
SmartDevideStatus smartDevideStatus=smartDevideStatusMapper.findDevStatusByIdAndCode(event.getSn(), Constants.MACHINE_STATUS_ORDER); log.info("开始消费,设备{}号,操作{}",event.getSn(),event);
SmartDevideStatus smartDevideStatus=smartDevideStatusMapper.findDevStatusByIdAndCode(event.getSn(), event.getDeviceType());
if(smartDevideStatus==null){ if(smartDevideStatus==null){
smartDevideStatus=new SmartDevideStatus(); smartDevideStatus=new SmartDevideStatus();
smartDevideStatus.setDeviceOrderCode(event.getDeviceType()); smartDevideStatus.setDeviceOrderCode(event.getDeviceType());
......
...@@ -104,10 +104,11 @@ public class Event implements Serializable{ ...@@ -104,10 +104,11 @@ public class Event implements Serializable{
"userId='" + userId + '\'' + "userId='" + userId + '\'' +
", sn='" + sn + '\'' + ", sn='" + sn + '\'' +
", type='" + type + '\'' + ", type='" + type + '\'' +
", time='" + time + '\'' + ", time=" + time +
", deviceType='" + deviceType + '\'' + ", deviceType='" + deviceType + '\'' +
", accessTime='" + accessTime + '\'' + ", accessTime='" + accessTime + '\'' +
", receiveTime='" + receiveTime + '\'' + ", receiveTime='" + receiveTime + '\'' +
", value='" + value + '\'' +
'}'; '}';
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!