diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs index 9659819f..6263f6a2 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs @@ -31,6 +31,19 @@ public class Ghrh_ResumeTemplateServices : BaseServices SwitchPublish(long id, int? isPublish) { + + if (isPublish == 0) + return ServiceResult.OprateFailed("当前已开启状态 不可以取消!"); + + await Db.Updateable() + .SetColumns(it => new Ghrh_ResumeTemplate() + { + IsPublish = 0, + UpdateBy = App.User.ID, + UpdateTime = DateTime.Now + }) + .Where(it => it.IsPublish == 1) + .ExecuteCommandAsync(); await Db.Updateable() .SetColumns(it => new Ghrh_ResumeTemplate() { @@ -2379,7 +2392,7 @@ END"; IF @doType = 'Copy' BEGIN - SET @NewResumeTemplateId = '1846788600784621570' + SET @NewResumeTemplateId = '{SnowFlakeSingle.Instance.NextId()}' INSERT INTO [dbo].[Ghrh_ResumeTemplate] ( Id,