FlowAttachmentService.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using GxPress.Service.Interface.FlowAttachment;
  2. using GxPress.Repository.Interface.FlowAttachment;
  3. using System.Collections.Generic;
  4. using System.Threading.Tasks;
  5. namespace GxPress.Service.Implement.FlowAttachment
  6. {
  7. public class FlowAttachmentService : IFlowAttachmentService
  8. {
  9. private readonly IFlowAttachmentRepository flowAttachmentRepository;
  10. public FlowAttachmentService(IFlowAttachmentRepository flowAttachmentRepository)
  11. {
  12. this.flowAttachmentRepository = flowAttachmentRepository;
  13. }
  14. /// <summary>
  15. /// 添加
  16. /// </summary>
  17. /// <param name="flowAttachments"></param>
  18. /// <returns></returns>
  19. public async Task<bool> InsertFlowAttachments(List<Entity.WorkFlow.FlowAttachment> flowAttachments)
  20. {
  21. return await flowAttachmentRepository.InsertsAsync(flowAttachments);
  22. }
  23. /// <summary>
  24. /// 获取文件
  25. /// </summary>
  26. /// <param name="flowAttachments"></param>
  27. /// <returns></returns>
  28. public async Task<IEnumerable<Entity.WorkFlow.FlowAttachment>> FindFlowAttachments(SqlKata.Query query)
  29. {
  30. return await flowAttachmentRepository.GetAllAsync(query);
  31. }
  32. }
  33. }