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)