mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 09:25:54 +08:00
Merge remote-tracking branch 'origin/master' into version1.2
This commit is contained in:
@@ -2,6 +2,7 @@ package com.ruoyi.iot.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.iot.domain.DeviceLog;
|
||||
import com.ruoyi.iot.tdengine.service.ILogService;
|
||||
import com.ruoyi.iot.mapper.DeviceLogMapper;
|
||||
import com.ruoyi.iot.model.MonitorModel;
|
||||
import com.ruoyi.iot.service.IDeviceLogService;
|
||||
@@ -22,6 +23,9 @@ public class DeviceLogServiceImpl implements IDeviceLogService
|
||||
@Autowired
|
||||
private DeviceLogMapper deviceLogMapper;
|
||||
|
||||
@Autowired
|
||||
private ILogService logService;
|
||||
|
||||
/**
|
||||
* 查询设备日志
|
||||
*
|
||||
@@ -43,7 +47,8 @@ public class DeviceLogServiceImpl implements IDeviceLogService
|
||||
@Override
|
||||
public List<DeviceLog> selectDeviceLogList(DeviceLog deviceLog)
|
||||
{
|
||||
return deviceLogMapper.selectDeviceLogList(deviceLog);
|
||||
// deviceLogMapper.selectDeviceLogList(deviceLog);
|
||||
return logService.selectDeviceLogList(deviceLog);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +60,8 @@ public class DeviceLogServiceImpl implements IDeviceLogService
|
||||
@Override
|
||||
public List<MonitorModel> selectMonitorList(DeviceLog deviceLog)
|
||||
{
|
||||
return deviceLogMapper.selectMonitorList(deviceLog);
|
||||
// return deviceLogMapper.selectMonitorList(deviceLog);
|
||||
return logService.selectMonitorList(deviceLog);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +74,8 @@ public class DeviceLogServiceImpl implements IDeviceLogService
|
||||
public int insertDeviceLog(DeviceLog deviceLog)
|
||||
{
|
||||
deviceLog.setCreateTime(DateUtils.getNowDate());
|
||||
return deviceLogMapper.insertDeviceLog(deviceLog);
|
||||
// return deviceLogMapper.insertDeviceLog(deviceLog);
|
||||
return logService.saveDeviceLog(deviceLog);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,13 +11,13 @@ import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.iot.domain.Device;
|
||||
import com.ruoyi.iot.domain.DeviceLog;
|
||||
import com.ruoyi.iot.domain.Product;
|
||||
import com.ruoyi.iot.tdengine.service.ILogService;
|
||||
import com.ruoyi.iot.mapper.DeviceLogMapper;
|
||||
import com.ruoyi.iot.mapper.DeviceMapper;
|
||||
import com.ruoyi.iot.mapper.DeviceUserMapper;
|
||||
import com.ruoyi.iot.model.*;
|
||||
import com.ruoyi.iot.model.ThingsModelItem.*;
|
||||
import com.ruoyi.iot.model.ThingsModels.*;
|
||||
import com.ruoyi.iot.service.IDeviceLogService;
|
||||
import com.ruoyi.iot.service.IDeviceService;
|
||||
import com.ruoyi.iot.service.IProductService;
|
||||
import com.ruoyi.iot.service.IToolService;
|
||||
@@ -73,8 +73,11 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
// @Autowired
|
||||
// private IDeviceLogService deviceLogService;
|
||||
|
||||
@Autowired
|
||||
private IDeviceLogService deviceLogService;
|
||||
private ILogService logService;
|
||||
|
||||
/**
|
||||
* 查询设备
|
||||
@@ -196,7 +199,8 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
deviceLog.setCreateTime(DateUtils.getNowDate());
|
||||
deviceLog.setIsMonitor(valueList.get(k).getIsMonitor());
|
||||
deviceLog.setLogType(type);
|
||||
deviceLogMapper.insertDeviceLog(deviceLog);
|
||||
logService.saveDeviceLog(deviceLog);
|
||||
// deviceLogMapper.insertDeviceLog(deviceLog);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -591,7 +595,8 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
deviceLog.setIdentity("offline");
|
||||
deviceLog.setLogType(6);
|
||||
}
|
||||
deviceLogService.insertDeviceLog(deviceLog);
|
||||
logService.saveDeviceLog(deviceLog);
|
||||
// deviceLogService.insertDeviceLog(deviceLog);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user