From b021c38b7281c186069e1336625a43a787a9780a Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 10 Feb 2025 13:56:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=8F=AD=E9=A1=B5=E9=9D=A2=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_OpenClassController.cs | 15 +++++++++++++ Tiobon.Core.Api/Tiobon.Core.xml | 8 +++++++ .../Ghre/Ghre_OpenClassServices.cs | 21 ++++++++++++++++++- .../Ghre/Ghre_RequestServices.cs | 4 +--- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs index 811f6b7f..23058395 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs @@ -11,4 +11,19 @@ public class Ghre_OpenClassController : BaseController + /// 根据条件查询数据 + /// + /// 条件 + /// status + /// + [HttpPost, Route("QueryList/{status}")] + public async Task> QueryByStatus([FromBody] QueryBody body, string status) + { + return await _service.QueryFilterPage(body, $"Status ='{status}'"); + } + #endregion + } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 2b10eb93..c433098e 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1145,6 +1145,14 @@ 开班管理(Controller) + + + 根据条件查询数据 + + 条件 + status + + 开班费用(Controller) diff --git a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs index 3189bb9c..4dce190c 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs @@ -1,4 +1,7 @@ -namespace Tiobon.Core.Services; +using static Tiobon.Core.Model.Consts; +using Tiobon.Core.Common.DB.Dapper.Extensions; + +namespace Tiobon.Core.Services; /// /// 开班管理 (服务) @@ -12,4 +15,20 @@ public class Ghre_OpenClassServices : BaseServices Add(InsertGhre_OpenClassInput entity) + { + var result = await base.Add(entity); + + return result; + } + + public override async Task Update(long Id, EditGhre_OpenClassInput editModel) + { + + var result = await base.Update(Id, editModel, null, ["Status"]); + return result; + } } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs b/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs index 791cf606..94c2a67c 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs @@ -1,6 +1,4 @@ -using Mapster; -using Microsoft.IdentityModel.Tokens; -using Serilog; +using Serilog; using static Tiobon.Core.Model.Consts; namespace Tiobon.Core.Services;