|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
using Org.BouncyCastle.Crypto; |
|
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
@ -469,6 +470,24 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
|
Status = status, |
|
|
|
|
UpdateBy = App.User.ID, |
|
|
|
|
UpdateTime = DateTime.Now, |
|
|
|
|
RecycledTime = null, |
|
|
|
|
}) |
|
|
|
|
.Where(it => ids.Contains(it.Id)).ExecuteCommandAsync(); |
|
|
|
|
return result > 0 ? true : false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 回收简历 |
|
|
|
|
public async Task<bool> Recovery(List<long> ids) |
|
|
|
|
{ |
|
|
|
|
var result = await Db.Updateable<Ghrh_Resume>() |
|
|
|
|
.SetColumns(it => new Ghrh_Resume() |
|
|
|
|
{ |
|
|
|
|
Status = "Recycled", |
|
|
|
|
UpdateBy = App.User.ID, |
|
|
|
|
UpdateTime = DateTime.Now, |
|
|
|
|
RecycledTime = DateTime.Now, |
|
|
|
|
}) |
|
|
|
|
.Where(it => ids.Contains(it.Id)).ExecuteCommandAsync(); |
|
|
|
|
return result > 0 ? true : false; |
|
|
|
@ -2208,6 +2227,26 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1"; |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 回收站中的简历30天后自动删除 |
|
|
|
|
public async Task<ServiceResult> OverTimeDeleteResume() |
|
|
|
|
{ |
|
|
|
|
var dt = Db.GetDate().AddDays(-30); |
|
|
|
|
|
|
|
|
|
var list = await base.Query(x => x.Status == "Recycled" && x.RecycledTime <= dt); |
|
|
|
|
var ids = list.Select(x => x.Id).ToList(); |
|
|
|
|
if (ids.Any()) |
|
|
|
|
await Db.Updateable<Ghrh_Resume>() |
|
|
|
|
.SetColumns(it => new Ghrh_Resume() |
|
|
|
|
{ |
|
|
|
|
IsEnable = 0, |
|
|
|
|
UpdateBy = App.User.ID, |
|
|
|
|
UpdateTime = DateTime.Now, |
|
|
|
|
}) |
|
|
|
|
.Where(it => ids.Contains(it.Id)).ExecuteCommandAsync(); |
|
|
|
|
return ServiceResult.OprateSuccess(); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 通用方法 |
|
|
|
|
/// <summary> |
|
|
|
|
/// 记录日志 |
|
|
|
|