Compare commits
No commits in common. "381b1965cfafbe541c6dd1ae8c45b738e24f95d1" and "758273d3621de1eba2ec51c97fa49c2b25653208" have entirely different histories.
381b1965cf
...
758273d362
|
|
@ -52,14 +52,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var verifyExp2 = new EntityVerifyExp<EmailNoticeConfig>()
|
|
||||||
{
|
|
||||||
VerifyExp = t => t.Code == addOrEditEmailNoticeConfig.Code && t.IsDistinguishCriteria == addOrEditEmailNoticeConfig.IsDistinguishCriteria && t.SystemLevel == addOrEditEmailNoticeConfig.SystemLevel,
|
|
||||||
|
|
||||||
VerifyMsg = _localizer["EmailNoticeConfig_RepeatCode"]
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 匹配所有占位符的正则表达式,允许包含空格的占位符
|
// 匹配所有占位符的正则表达式,允许包含空格的占位符
|
||||||
var regex = new Regex(@"\{\s*\d+\s*\}");
|
var regex = new Regex(@"\{\s*\d+\s*\}");
|
||||||
|
|
||||||
|
|
@ -94,7 +86,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await _emailNoticeConfigrepository.AddAsync(entity, true, verifyExp1, verifyExp2);
|
await _emailNoticeConfigrepository.AddAsync(entity, true, verifyExp1);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -117,7 +109,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
entity = await _emailNoticeConfigrepository.UpdateFromDTOAsync(addOrEditEmailNoticeConfig, true, false, verifyExp1, verifyExp2);
|
entity = await _emailNoticeConfigrepository.UpdateFromDTOAsync(addOrEditEmailNoticeConfig, true, false, verifyExp1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -125,20 +117,13 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (entity.EmailCron != string.Empty)
|
if(entity.EmailCron != string.Empty && entity.IsAutoSend)
|
||||||
{
|
{
|
||||||
var jobId = $"{entity.Id}_({entity.BusinessScenarioEnum})";
|
var jobId = $"{entity.Id}_({entity.BusinessScenarioEnum})";
|
||||||
|
|
||||||
//有的job 可能编辑控制直接不发,需要移除已存在的
|
|
||||||
HangfireJobHelper.RemoveCronJob(jobId);
|
|
||||||
|
|
||||||
if (entity.IsAutoSend && entity.IsEnable)
|
|
||||||
{
|
|
||||||
HangfireJobHelper.AddOrUpdateSystemCronJob(jobId, entity.BusinessScenarioEnum, entity.EmailCron);
|
HangfireJobHelper.AddOrUpdateSystemCronJob(jobId, entity.BusinessScenarioEnum, entity.EmailCron);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1658,8 +1658,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
{
|
{
|
||||||
var emailNoticeConfigQueryable = _emailNoticeConfigrepository
|
var emailNoticeConfigQueryable = _emailNoticeConfigrepository
|
||||||
//.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
|
//.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
|
||||||
.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
//.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
||||||
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
//.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||||
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
|
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
|
||||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue