修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3d10482da8
commit
1a2c51da12
|
@ -4,8 +4,10 @@
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
|
@ -61,10 +63,14 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var entity=new EmailNoticeConfig() { };
|
||||
|
||||
if (addOrEditEmailNoticeConfig.Id == null)
|
||||
{
|
||||
|
||||
var entity = _mapper.Map<EmailNoticeConfig>(addOrEditEmailNoticeConfig);
|
||||
entity = _mapper.Map<EmailNoticeConfig>(addOrEditEmailNoticeConfig);
|
||||
|
||||
|
||||
foreach (var item in addOrEditEmailNoticeConfig.ToUserTypeList)
|
||||
|
@ -82,7 +88,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
await _emailNoticeConfigrepository.AddAsync(entity, true, verifyExp1);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -103,14 +109,25 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
}
|
||||
|
||||
|
||||
var entity = await _emailNoticeConfigrepository.UpdateFromDTOAsync(addOrEditEmailNoticeConfig, true, false, verifyExp1);
|
||||
entity = await _emailNoticeConfigrepository.UpdateFromDTOAsync(addOrEditEmailNoticeConfig, true, false, verifyExp1);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(entity.EmailCron != string.Empty && entity.IsAutoSend)
|
||||
{
|
||||
var jobId = $"{entity.Id}_({entity.BusinessScenarioEnum})";
|
||||
|
||||
HangfireJobHelper.AddOrUpdateSystemCronJob(jobId, entity.BusinessScenarioEnum, entity.EmailCron);
|
||||
}
|
||||
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue