VisaCommissionRepository.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using AutoMapper;
  2. using OASystem.Domain.Entities.Groups;
  3. using OASystem.Domain.ViewModels.Groups;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace OASystem.Infrastructure.Repositories.Groups
  10. {
  11. /// <summary>
  12. /// 签证提成录入
  13. /// 仓储
  14. /// </summary>
  15. public class VisaCommissionRepository : BaseRepository<Grp_VisaCommission, VisaCommissionViewModel>
  16. {
  17. private readonly IMapper _mapper;
  18. private readonly DelegationInfoRepository _groupRep;
  19. public VisaCommissionRepository(SqlSugarClient sqlSugar, IMapper mapper, DelegationInfoRepository groupRep)
  20. : base(sqlSugar)
  21. {
  22. _mapper = mapper;
  23. _groupRep = groupRep;
  24. }
  25. /// <summary>
  26. /// 基础数据
  27. /// </summary>
  28. /// <returns></returns>
  29. public async Task<JsonView> _Init()
  30. {
  31. var groupInfo = await _groupRep.GetGroupNameList(new Domain.Dtos.Groups.GroupNameDto() { PortType = 1 });
  32. return new JsonView() { Code = StatusCodes.Status200OK, Msg = "操作成功!", Data = new { GroupData = groupInfo.Data } };
  33. }
  34. }
  35. }