mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 17:35:54 +08:00
后端TDengine统计分类数量
This commit is contained in:
@@ -757,12 +757,15 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
public int deleteDeviceByDeviceIds(Long[] deviceIds) throws SchedulerException {
|
||||
// 删除设备分组
|
||||
deviceMapper.deleteDeviceGroupByDeviceIds(deviceIds);
|
||||
// 删除设备日志
|
||||
// TODO 删除设备日志 td里面删除
|
||||
deviceLogMapper.deleteDeviceLogByDeviceIds(deviceIds);
|
||||
// TODO 删除设备告警记录
|
||||
|
||||
// 删除定时任务
|
||||
deviceJobService.deleteJobByDeviceIds(deviceIds);
|
||||
|
||||
// TODO 删除设备用户
|
||||
// 删除设备用户
|
||||
deviceUserMapper.deleteDeviceUserByDeviceIds(deviceIds);
|
||||
// 删除设备
|
||||
return deviceMapper.deleteDeviceByDeviceIds(deviceIds);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.iot.domain.Product;
|
||||
import com.ruoyi.iot.mapper.ProductAuthorizeMapper;
|
||||
import com.ruoyi.iot.mapper.ProductMapper;
|
||||
import com.ruoyi.iot.model.ChangeProductStatusModel;
|
||||
import com.ruoyi.iot.model.IdAndName;
|
||||
@@ -32,6 +33,9 @@ public class ProductServiceImpl implements IProductService
|
||||
@Autowired
|
||||
private ProductMapper productMapper;
|
||||
|
||||
@Autowired
|
||||
private ProductAuthorizeMapper productAuthorizeMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@@ -185,6 +189,8 @@ public class ProductServiceImpl implements IProductService
|
||||
}
|
||||
// 删除产品物模型
|
||||
productMapper.deleteProductThingsModelByProductIds(productIds);
|
||||
// 删除产品的授权码
|
||||
productAuthorizeMapper.deleteProductAuthorizeByProductIds(productIds);
|
||||
// 删除产品
|
||||
if(productMapper.deleteProductByProductIds(productIds)>0){
|
||||
return AjaxResult.success("删除成功");
|
||||
|
||||
Reference in New Issue
Block a user