Commit 777344ec authored by 赵啸非's avatar 赵啸非

添加离线 上线日志

parent 0b6bc736
......@@ -82,16 +82,16 @@ public class DirectDynamicListener implements MessageListener {
entity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
DeviceEntity condition = new DeviceEntity();
condition.setId(deviceEntity.getId());
deviceService.getDeviceDao().update(entity, condition);
int update = deviceService.getDeviceDao().update(entity, condition);
// deviceService.update(deviceEntity);
PlatformEntity platformEntity = platformService.get(deviceEntity.getPlatformId());
ProductEntity productEntity = productService.get(deviceEntity.getProductId());
if (!ObjectUtils.isEmpty(platformEntity) && !ObjectUtils.isEmpty(productEntity)) {
//新增设备通知第三方平台
// deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
}
log.info("deviceCode:{},deviceName:{}==>上线", deviceEntity.getDeviceCode(), deviceEntity.getDeviceName());
log.info("id:{},deviceCode:{} deviceStatus:{},updateRet:{}==>上线 ", entity.getId(), deviceEntity.getDeviceCode(), entity.getDeviceStatus(),update);
}
if (!Constant.MESSAGETYPE_HEARTBEAT.equalsIgnoreCase(messageType)) {
DeviceLogEntity deviceLogEntity = new DeviceLogEntity();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment