Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

45 rindas
1.4 KiB

  1. using HKCardIN.Helper;
  2. using Newtonsoft.Json.Linq;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Security.Policy;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using XExten.Advance.HttpFramework.MultiCommon;
  10. using XExten.Advance.HttpFramework.MultiFactory;
  11. using XExten.Advance.LinqFramework;
  12. namespace HKCardIN.Logic
  13. {
  14. public class BaseLogic : Singleton<BaseLogic>
  15. {
  16. /// <summary>
  17. /// 同步用户和卡信息
  18. /// </summary>
  19. /// <returns></returns>
  20. public async Task<dynamic> PullUserAndCardInfo(string CardNo)
  21. {
  22. return await IHttpMultiClient.HttpMulti.AddNode(t =>
  23. {
  24. t.NodePath = ApiRoute.PullUserAndCardInfo;
  25. }).Build().RunStringFirstAsync();
  26. }
  27. /// <summary>
  28. /// 同步充值记录
  29. /// </summary>
  30. /// <param name="input"></param>
  31. /// <returns></returns>
  32. public bool PushMoneyToServer(string CardNo, decimal Money)
  33. {
  34. var data = IHttpMultiClient.HttpMulti.AddNode(t =>
  35. {
  36. t.NodePath = ApiRoute.PushMoneyToServer;
  37. t.ReqType = MultiType.POST;
  38. t.JsonParam = (new { Money, Type = 1, No = CardNo }).ToJson();
  39. }).Build().RunStringFirst();
  40. return bool.Parse(data.ToModel<JObject>()["data"].ToString());
  41. }
  42. }
  43. }