修改表
This commit is contained in:
@@ -44,7 +44,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
///<summary> EmailNoticeConfigAddOrEdit 列表查询参数模型</summary>
|
||||
public class EmailNoticeConfigAddOrEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string Code { get; set; } = String.Empty;
|
||||
|
||||
|
||||
|
||||
@@ -16,18 +16,18 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class EmailNoticeConfigService : BaseService, IEmailNoticeConfigService
|
||||
{
|
||||
private readonly IRepository<EmailNoticeConfig> repository;
|
||||
private readonly IRepository<EmailNoticeConfig> _emailNoticeConfigrepository;
|
||||
|
||||
public EmailNoticeConfigService(IRepository<EmailNoticeConfig> repository)
|
||||
{
|
||||
this.repository = repository;
|
||||
_emailNoticeConfigrepository = repository;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<EmailNoticeConfigView>> GetEmailNoticeConfigList(EmailNoticeConfigQuery queryEmailNoticeConfig)
|
||||
{
|
||||
var emailNoticeConfigQueryable = _repository
|
||||
.WhereIf<EmailNoticeConfig>(queryEmailNoticeConfig.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryEmailNoticeConfig.BusinessScenarioEnum)
|
||||
var emailNoticeConfigQueryable = _emailNoticeConfigrepository
|
||||
.WhereIf(queryEmailNoticeConfig.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryEmailNoticeConfig.BusinessScenarioEnum)
|
||||
.WhereIf(queryEmailNoticeConfig.IsReturnRequired != null, t => t.IsReturnRequired == queryEmailNoticeConfig.IsReturnRequired)
|
||||
.WhereIf(queryEmailNoticeConfig.IsUrgent != null, t => t.IsUrgent == queryEmailNoticeConfig.IsUrgent)
|
||||
.WhereIf(queryEmailNoticeConfig.IsEnable != null, t => t.IsEnable == queryEmailNoticeConfig.IsEnable)
|
||||
@@ -40,7 +40,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public async Task<IResponseOutput> AddOrUpdateEmailNoticeConfig(EmailNoticeConfigAddOrEdit addOrEditEmailNoticeConfig)
|
||||
{
|
||||
|
||||
var entity = await _repository.InsertOrUpdateAsync<EmailNoticeConfig, EmailNoticeConfigAddOrEdit>(addOrEditEmailNoticeConfig, true);
|
||||
var entity = await _emailNoticeConfigrepository.InsertOrUpdateAsync(addOrEditEmailNoticeConfig, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[HttpDelete("{emailNoticeConfigId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteEmailNoticeConfig(Guid emailNoticeConfigId)
|
||||
{
|
||||
var success = await repository.BatchDeleteNoTrackingAsync(t => t.Id == emailNoticeConfigId);
|
||||
var success = await _emailNoticeConfigrepository.BatchDeleteNoTrackingAsync(t => t.Id == emailNoticeConfigId);
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user