From bad269a284a19ea27fc27c03b058576beb1e1245 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 28 Nov 2024 10:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96=E5=91=98?= =?UTF-8?q?=E5=B7=A5Email=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghra/Ghra_StaffController.cs | 11 +++++++++++ Tiobon.Core.Api/Tiobon.Core.Model.xml | 10 ++++++++++ Tiobon.Core.Api/Tiobon.Core.xml | 7 +++++++ Tiobon.Core.IServices/Ghra/IGhra_StaffServices.cs | 8 +++++--- Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs | 11 +++++++++++ Tiobon.Core/Tiobon.Core.Model.xml | 10 ++++++++++ Tiobon.Core/Tiobon.Core.xml | 7 +++++++ 7 files changed, 61 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffController.cs b/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffController.cs index 724611f7..7a2b9cf1 100644 --- a/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffController.cs +++ b/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffController.cs @@ -26,4 +26,15 @@ public class Ghra_StaffController : BaseController + /// 查询邮箱 + /// + /// + /// + [HttpPost("QueryEmail/{Id}")] + public async Task> QueryEmail(int Id) => await _service.QueryEmail(Id); + #endregion + } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 487cedd7..5ea55656 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -23882,6 +23882,16 @@ 附件 + + + 部门负责人ID + + + + + 部门负责人邮箱 + + 员工ID diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 488f4c95..d770247b 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -689,6 +689,13 @@ + + + 查询邮箱 + + + + Ghra_StaffLicence(Controller) diff --git a/Tiobon.Core.IServices/Ghra/IGhra_StaffServices.cs b/Tiobon.Core.IServices/Ghra/IGhra_StaffServices.cs index e475ab19..842e6e3d 100644 --- a/Tiobon.Core.IServices/Ghra/IGhra_StaffServices.cs +++ b/Tiobon.Core.IServices/Ghra/IGhra_StaffServices.cs @@ -7,7 +7,9 @@ namespace Tiobon.Core.IServices; /// /// Ghra_Staff(自定义服务接口) /// - public interface IGhra_StaffServices :IBaseServices +public interface IGhra_StaffServices : IBaseServices { - Task> QuerySimple(int id); - } \ No newline at end of file + Task> QuerySimple(int id); + + Task> QueryEmail(int id); +} \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs b/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs index eb63b68f..241bfda5 100644 --- a/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs +++ b/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs @@ -35,4 +35,15 @@ public class Ghra_StaffServices : BaseServices.OprateSuccess("查询成功!", entity); } + + public async Task> QueryEmail(int id) + { + string email = string.Empty; + var entity = await Db.Ado.SqlQuerySingleAsync($"SELECT * FROM Ghra_Staff WHERE StaffID='{id}' "); + + + if (entity != null) + email = entity.Email; + return ServiceResult.OprateSuccess("查询成功!", email); + } } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 487cedd7..5ea55656 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -23882,6 +23882,16 @@ 附件 + + + 部门负责人ID + + + + + 部门负责人邮箱 + + 员工ID diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 488f4c95..d770247b 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -689,6 +689,13 @@ + + + 查询邮箱 + + + + Ghra_StaffLicence(Controller)