添加设备类、设备日志类、设备服务类、设备控制器

This commit is contained in:
2026-08-28 17:28:16 +08:00
parent 6c20630a40
commit cfa8e78d33
11 changed files with 667 additions and 23 deletions
@@ -0,0 +1,44 @@
using Model;
using Model.Dto.Config;
using SqlSugar;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Service.Interface.Config
{
/// <summary>
/// IOT设备管理 服务接口
/// </summary>
public interface IDeviceService
{
/// <summary>
/// 分页查询设备列表(支持关键字搜索编号/名称/类型)
/// </summary>
Task<Result<List<IotDeviceDto>>> GetPagedAsync(int pageIndex, int pageSize, RefAsync<int> total, string? keyword);
/// <summary>
/// 根据 Id 获取设备详情
/// </summary>
Task<Result<IotDeviceDto>> GetByIdAsync(long id);
/// <summary>
/// 新增设备(校验编号唯一性)
/// </summary>
Task<Result> AddAsync(IotDeviceDto dto);
/// <summary>
/// 修改设备
/// </summary>
Task<Result> UpdateAsync(IotDeviceDto dto);
/// <summary>
/// 删除设备(软删除)
/// </summary>
Task<Result> DeleteAsync(long id);
/// <summary>
/// 分页查询指定设备的日志(设备独享日志)
/// </summary>
Task<Result<List<DeviceLogDto>>> GetDeviceLogsAsync(long deviceId, int pageIndex, int pageSize, RefAsync<int> total);
}
}
@@ -1,10 +0,0 @@
namespace Service.Interface
{
/// <summary>
/// IOT设备管理 服务接口
/// </summary>
public interface IIotDeviceService
{
// TODO: 定义 IOT设备管理 相关方法
}
}