AlertFreezeCustomerJob.cs 882 B

12345678910111213141516171819202122232425
  1. using Quartz;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using XYY.Tool.QuotaReduction;
  8. namespace XYY.Tool.TimingTask.jobs
  9. {
  10. /// <summary>
  11. /// 预告客户冻结
  12. /// </summary>
  13. public class AlertFreezeCustomerJob : IJob
  14. {
  15. public async Task Execute(IJobExecutionContext context)
  16. {
  17. RestSharp.RestClient client = new RestSharp.RestClient(JobConfig.AlertFreezeCustomerJobApi);
  18. RestSharp.RestRequest request = new RestSharp.RestRequest(RestSharp.Method.GET);
  19. //request.AddHeader("Authorization", "token 57AEDE5487260443D6BF2182D31286B1");
  20. var result = await client.ExecuteAsync(request);
  21. Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 【冻结客户提醒】调用成功!");
  22. }
  23. }
  24. }