邮件模板删除附件

dev
嵇文龙 2 months ago
parent 8dc7ab5295
commit 1b38fb3b5d

@ -62,5 +62,12 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction
/// <param name="model"></param>
/// <returns></returns>
Task<DataResult> DeleteAsync(IdModel model);
/// <summary>
/// 删除附件
/// </summary>
/// <param name="attachments"></param>
/// <returns></returns>
Task<DataResult> DeleteAttachmentsAsync(List<BusinessTaskAttachment> attachments);
}
}

@ -190,5 +190,15 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
}
}
/// <summary>
/// 删除附件
/// </summary>
/// <param name="attachments"></param>
/// <returns></returns>
public async Task<DataResult> DeleteAttachmentsAsync(List<BusinessTaskAttachment> attachments)
{
await TenantDb.Deleteable(attachments).ExecuteCommandAsync();
return DataResult.Success;
}
}
}

@ -95,7 +95,7 @@ namespace DS.WMS.OpApi.Controllers
/// <param name="taskMail">邮件配置</param>
/// <returns></returns>
[HttpPost, Route("Edit")]
public async Task<DataResult> EditAsync(BusinessTaskMail taskMail)
public async Task<DataResult> EditAsync([FromBody] BusinessTaskMail taskMail)
{
if (taskMail.Receiver == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskMailReceiverNotNull));
@ -112,9 +112,20 @@ namespace DS.WMS.OpApi.Controllers
/// <param name="idModel"></param>
/// <returns></returns>
[HttpPost, Route("Delete")]
public async Task<DataResult> DeleteAsync(IdModel idModel)
public async Task<DataResult> DeleteAsync([FromBody] IdModel idModel)
{
return await service.DeleteAsync(idModel);
}
/// <summary>
/// 删除附件
/// </summary>
/// <param name="attachments"></param>
/// <returns></returns>
[HttpPost, Route("DeleteAttachments")]
public async Task<DataResult> DeleteAttachmentsAsync([FromBody] List<BusinessTaskAttachment> attachments)
{
return await service.DeleteAttachmentsAsync(attachments);
}
}
}

Loading…
Cancel
Save