GhbzGhxmLogRepository.cs 905 B

12345678910111213141516171819202122232425262728293031
  1. using QM.KJGH.CGGL.IRepository;
  2. using QM.KJGH.CGGL.Model.Ghxms;
  3. using QM.KJGH.Model.KJGH;
  4. using QM.OrmSqlSugar;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using WS;
  11. using WS.AutoMapper;
  12. namespace QM.KJGH.CGGL.Repository
  13. {
  14. public class GhbzGhxmLogRepository : SqlSugarRepository<GhbzGhxmLog>, IGhbzGhxmLogRepository
  15. {
  16. /// <summary>
  17. /// 添加日志
  18. /// </summary>
  19. /// <param name="ghbzGhxmLogDto"></param>
  20. /// <returns></returns>
  21. public async Task<GhbzGhxmLog> Add(GhbzGhxmLogDto ghbzGhxmLogDto)
  22. {
  23. if (ghbzGhxmLogDto == null)
  24. throw new UseArgumentException("请求参数错误");
  25. var model = ghbzGhxmLogDto.MapTo<GhbzGhxmLog>();
  26. var result = await InsertAsync(model);
  27. return result;
  28. }
  29. }
  30. }