PdaAutoUpdateService.cs 986 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using Infrastructure.Attribute;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using ZR.Model.Models.Inspect;
  8. using ZR.Model.System;
  9. using ZR.Service.System.IService;
  10. namespace ZR.Service.System
  11. {
  12. [AppService(ServiceType = typeof(IPdaAutoUpdateService), ServiceLifetime = LifeTime.Transient)]
  13. public class PdaAutoUpdateService : BaseService<PdaAutoUpdate>, IPdaAutoUpdateService
  14. {
  15. #region 依赖注入
  16. public PdaAutoUpdateService()
  17. {
  18. }
  19. #endregion
  20. #region 业务逻辑代码
  21. public int AddPdaAutoUpdate(PdaAutoUpdate model)
  22. {
  23. model.PublishTime = DateTime.Now;
  24. return Add(model, true);
  25. }
  26. public PdaAutoUpdate GetPdaLatestmsg()
  27. {
  28. var response = Queryable()
  29. .OrderByDescending(x => x.Id).First();
  30. return response;
  31. }
  32. #endregion
  33. }
  34. }