You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Tiobon.Web.Core/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_TemplateController.cs

46 lines
1.6 KiB

namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// 招聘模板(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghrh)]
public class Ghrh_TemplateController : BaseController<IGhrh_TemplateServices, Ghrh_Template, Ghrh_TemplateDto, InsertGhrh_TemplateInput, EditGhrh_TemplateInput>
{
public Ghrh_TemplateController(IGhrh_TemplateServices service) : base(service)
{
}
#region 是否开启
/// <summary>
/// 是否开启
/// </summary>
/// <param name="id"></param>
/// <param name="isPublish"></param>
/// <returns></returns>
[HttpPost("SwitchPublish/{id}/{isPublish}")]
public async Task<ServiceResult> SwitchPublish(long id, int? isPublish) => await _service.SwitchPublish(id, isPublish);
#endregion
#region 查询Offer支持的字段
/// <summary>
/// Offer支持的字段
/// </summary>
/// <returns></returns>
[HttpPost("QueryOfferTags")]
public async Task<ServiceResult<List<CustomFieldView>>> QueryOfferTags() => await _service.QueryOfferTags();
#endregion
#region 预览
/// <summary>
/// 预览Offer
/// </summary>
/// <param name="resumeId">简历Id</param>
/// <param name="templateId">模板ID</param>
/// <param name="extFields">扩展字段</param>
/// <returns></returns>
[HttpPost("Preview/{resumeId}/{templateId}")]
public async Task<ServiceResult<string>> Preview(long resumeId, long templateId, Dictionary<string, string> extFields) => await _service.Preview(resumeId, templateId, extFields);
#endregion
}