From f1a8bbee88ab66fab3ae6ac3a3e5e8d43bc1b78e Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 24 Oct 2024 14:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=87=E6=B3=A8=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghrh/Ghrh_ResumeController.cs | 16 ++++++++++++++++ Tiobon.Core.Api/Tiobon.Core.xml | 6 ++++++ .../Ghrh/IGhrh_ResumeServices.cs | 2 ++ .../ViewModels/Extend/ResumeMarkTag.cs | 9 +++++++++ .../Ghrh/Ghrh_ResumeServices.cs | 18 ++++++++++++++++++ Tiobon.Core/Tiobon.Core.xml | 6 ++++++ 6 files changed, 57 insertions(+) create mode 100644 Tiobon.Core.Model/ViewModels/Extend/ResumeMarkTag.cs diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index dff909d9..d7aef41d 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -112,4 +112,20 @@ public class Ghrh_ResumeController : BaseController + /// 添加标签 + /// + /// + [HttpPost("MarkTags")] + public async Task MarkTags([FromBody] ResumeMarkTag markTag) + { + bool result = await _service.MarkTags(markTag.Ids, markTag.Tags); + if (result) + return ServiceResult.OprateSuccess("添加成功!"); + return ServiceResult.OprateFailed("添加失败!"); + + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 4ff5588e..f0153a38 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1199,6 +1199,12 @@ + + + 添加标签 + + + 教育背景(Controller) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 24282b6d..44e20700 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -17,5 +17,7 @@ namespace Tiobon.Core.IServices Task SwitchIsRecommend(List ids, bool isRecommend); Task UpdateStatus(List ids, string status); + + Task MarkTags(List ids, List tags); } } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeMarkTag.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeMarkTag.cs new file mode 100644 index 00000000..6a538087 --- /dev/null +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeMarkTag.cs @@ -0,0 +1,9 @@ +namespace Tiobon.Core.Model.ViewModels.Extend; + +public class ResumeMarkTag +{ + public List Ids { get; set; } + public List Tags { get; set; } +} + + diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index c902c597..badabe6a 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -247,4 +247,22 @@ public class Ghrh_ResumeServices : BaseServices MarkTags(List ids, List tags) + { + var tag = JsonHelper.ObjToJson(tags); + var result = await Db.Updateable() + .SetColumns(it => new Ghrh_Resume() + { + Tags = tag, + UpdateBy = App.User.ID, + UpdateTime = DateTime.Now, + }) + .Where(it => ids.Contains(it.Id)) + .ExecuteCommandAsync(); + return result > 0 ? true : false; + + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 4ff5588e..f0153a38 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1199,6 +1199,12 @@ + + + 添加标签 + + + 教育背景(Controller)