From 26de55ce0aed30576c07b46bc07d1aafef445ff9 Mon Sep 17 00:00:00 2001
From: zhoukeda <1315948824@qq.com>
Date: Fri, 26 May 2023 17:30:49 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AEid=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
EquipMgr/Tnb.EquipMgr.Interfaces/IEquipmentService.cs | 11 +++++++++--
EquipMgr/Tnb.EquipMgr/EquipmentService.cs | 8 +++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/EquipMgr/Tnb.EquipMgr.Interfaces/IEquipmentService.cs b/EquipMgr/Tnb.EquipMgr.Interfaces/IEquipmentService.cs
index 26d6b24e..13e35519 100644
--- a/EquipMgr/Tnb.EquipMgr.Interfaces/IEquipmentService.cs
+++ b/EquipMgr/Tnb.EquipMgr.Interfaces/IEquipmentService.cs
@@ -1,7 +1,14 @@
-namespace Tnb.EquipMgr.Interfaces
+using Tnb.EquipMgr.Entities;
+
+namespace Tnb.EquipMgr.Interfaces
{
public interface IEquipmentService
{
-
+ ///
+ /// 根据id查设备
+ ///
+ ///
+ ///
+ public Task GetEntityById(Dictionary dic);
}
}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr/EquipmentService.cs b/EquipMgr/Tnb.EquipMgr/EquipmentService.cs
index 03d1183f..c059dbda 100644
--- a/EquipMgr/Tnb.EquipMgr/EquipmentService.cs
+++ b/EquipMgr/Tnb.EquipMgr/EquipmentService.cs
@@ -30,7 +30,6 @@ namespace Tnb.EquipMgr
public EquipmentService(ISqlSugarRepository repository)
{
_repository = repository;
- OverideFuncs.GetListAsync = GetList;
}
///
/// 在线开发-获取设备列表
@@ -63,5 +62,12 @@ namespace Tnb.EquipMgr
.ToPagedListAsync(input.currentPage, input.pageSize);
return pagedList;
}
+
+ [HttpPost]
+ public async Task GetEntityById(Dictionary dic)
+ {
+ string id = dic["id"];
+ return await _repository.GetSingleAsync(x => x.id == id);
+ }
}
}
\ No newline at end of file