后端TDengine统计分类数量

This commit is contained in:
kerwincui
2022-06-07 14:23:42 +08:00
parent 653eee4e76
commit d8e35ebfc3
11 changed files with 56 additions and 10 deletions

View File

@@ -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);
}

View File

@@ -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("删除成功");