MakeSqlHelper.cs 885 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Text;
  5. using System.Threading;
  6. using Common;
  7. using Infrastructure;
  8. using Services;
  9. using Model;
  10. using LitJson;
  11. //营业额日汇总统计
  12. public class MakeSqlHelper
  13. {
  14. public readonly static MakeSqlHelper Instance = new MakeSqlHelper();
  15. private MakeSqlHelper()
  16. { }
  17. public void Start(string QueueName)
  18. {
  19. RabbitMQClient.Instance.StartReceive(QueueName, content => DoWorks(content));
  20. }
  21. public void DoWorks(string content)
  22. {
  23. try
  24. {
  25. if(!string.IsNullOrEmpty(content))
  26. {
  27. DoQueue(content);
  28. }
  29. }
  30. catch (Exception ex)
  31. {
  32. Utils.WriteLog(DateTime.Now.ToString() + "\n" + ex, "生成SQL异常");
  33. }
  34. }
  35. public void DoQueue(string content)
  36. {
  37. }
  38. }