增加根据id获取设备接口
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
namespace Tnb.EquipMgr.Interfaces
|
using Tnb.EquipMgr.Entities;
|
||||||
|
|
||||||
|
namespace Tnb.EquipMgr.Interfaces
|
||||||
{
|
{
|
||||||
public interface IEquipmentService
|
public interface IEquipmentService
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id查设备
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dic"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Task<EqpEquipment> GetEntityById(Dictionary<string, string> dic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,6 @@ namespace Tnb.EquipMgr
|
|||||||
public EquipmentService(ISqlSugarRepository<EqpEquipment> repository)
|
public EquipmentService(ISqlSugarRepository<EqpEquipment> repository)
|
||||||
{
|
{
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
OverideFuncs.GetListAsync = GetList;
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 在线开发-获取设备列表
|
/// 在线开发-获取设备列表
|
||||||
@@ -63,5 +62,12 @@ namespace Tnb.EquipMgr
|
|||||||
.ToPagedListAsync(input.currentPage, input.pageSize);
|
.ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
return pagedList;
|
return pagedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<EqpEquipment> GetEntityById(Dictionary<string,string> dic)
|
||||||
|
{
|
||||||
|
string id = dic["id"];
|
||||||
|
return await _repository.GetSingleAsync(x => x.id == id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user