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.
41 lines
1.3 KiB
41 lines
1.3 KiB
|
|
using Tiobon.Core.IServices;
|
|
using Tiobon.Core.Model.Models;
|
|
using Tiobon.Core.Services.BASE;
|
|
using Tiobon.Core.IRepository.Base;
|
|
using Tiobon.Core.Common.Caches;
|
|
using Tiobon.Core.Model;
|
|
using Tiobon.Core.Common;
|
|
|
|
namespace Tiobon.Core.Services
|
|
{
|
|
/// <summary>
|
|
/// 简历模板 (服务)
|
|
/// </summary>
|
|
public class Ghrh_ResumeTemplateServices : BaseServices<Ghrh_ResumeTemplate, Ghrh_ResumeTemplateDto, InsertGhrh_ResumeTemplateInput, EditGhrh_ResumeTemplateInput>, IGhrh_ResumeTemplateServices
|
|
{
|
|
private readonly IBaseRepository<Ghrh_ResumeTemplate> _dal;
|
|
public Ghrh_ResumeTemplateServices(ICaching caching, IBaseRepository<Ghrh_ResumeTemplate> dal)
|
|
{
|
|
this._dal = dal;
|
|
base.BaseDal = dal;
|
|
base._caching = caching;
|
|
}
|
|
|
|
#region 是否开启
|
|
public async Task<ServiceResult> SwitchPublish(long id, int? isPublish)
|
|
{
|
|
await Db.Updateable<Ghrh_ResumeTemplate>()
|
|
.SetColumns(it => new Ghrh_ResumeTemplate()
|
|
{
|
|
IsPublish = isPublish,
|
|
UpdateBy = App.User.ID,
|
|
UpdateTime = DateTime.Now
|
|
})
|
|
.Where(it => it.Id == id)
|
|
.ExecuteCommandAsync();
|
|
return ServiceResult.OprateSuccess();
|
|
}
|
|
#endregion
|
|
}
|
|
} |