新增标注标签接口

master
xiaochanghai 8 months ago
parent 3130824718
commit f1a8bbee88
  1. 16
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 6
      Tiobon.Core.Api/Tiobon.Core.xml
  3. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  4. 9
      Tiobon.Core.Model/ViewModels/Extend/ResumeMarkTag.cs
  5. 18
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
  6. 6
      Tiobon.Core/Tiobon.Core.xml

@ -112,4 +112,20 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
}
#endregion
#region 添加标签
/// <summary>
/// 添加标签
/// </summary>
/// <returns></returns>
[HttpPost("MarkTags")]
public async Task<ServiceResult> MarkTags([FromBody] ResumeMarkTag markTag)
{
bool result = await _service.MarkTags(markTag.Ids, markTag.Tags);
if (result)
return ServiceResult.OprateSuccess("添加成功!");
return ServiceResult.OprateFailed("添加失败!");
}
#endregion
}

@ -1199,6 +1199,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.MarkTags(Tiobon.Core.Model.ViewModels.Extend.ResumeMarkTag)">
<summary>
添加标签
</summary>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_ResumeEduBGController">
<summary>
教育背景(Controller)

@ -17,5 +17,7 @@ namespace Tiobon.Core.IServices
Task<ServiceResult> SwitchIsRecommend(List<long> ids, bool isRecommend);
Task<bool> UpdateStatus(List<long> ids, string status);
Task<bool> MarkTags(List<long> ids, List<string> tags);
}
}

@ -0,0 +1,9 @@
namespace Tiobon.Core.Model.ViewModels.Extend;
public class ResumeMarkTag
{
public List<long> Ids { get; set; }
public List<string> Tags { get; set; }
}

@ -247,4 +247,22 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
}
#endregion
#region 添加标签
public async Task<bool> MarkTags(List<long> ids, List<string> tags)
{
var tag = JsonHelper.ObjToJson(tags);
var result = await Db.Updateable<Ghrh_Resume>()
.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
}

@ -1199,6 +1199,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.MarkTags(Tiobon.Core.Model.ViewModels.Extend.ResumeMarkTag)">
<summary>
添加标签
</summary>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_ResumeEduBGController">
<summary>
教育背景(Controller)

Loading…
Cancel
Save