|
- using HKCardIN.Helper;
- using Newtonsoft.Json.Linq;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Security.Policy;
- using System.Text;
- using System.Threading.Tasks;
- using XExten.Advance.HttpFramework.MultiCommon;
- using XExten.Advance.HttpFramework.MultiFactory;
- using XExten.Advance.LinqFramework;
-
- namespace HKCardIN.Logic
- {
- public class BaseLogic : Singleton<BaseLogic>
- {
- /// <summary>
- /// 同步用户和卡信息
- /// </summary>
- /// <returns></returns>
- public async Task<dynamic> PullUserAndCardInfo(string CardNo)
- {
- return await IHttpMultiClient.HttpMulti.AddNode(t =>
- {
- t.NodePath = ApiRoute.PullUserAndCardInfo;
- }).Build().RunStringFirstAsync();
- }
- /// <summary>
- /// 同步充值记录
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public bool PushMoneyToServer(string CardNo, decimal Money)
- {
- var data = IHttpMultiClient.HttpMulti.AddNode(t =>
- {
- t.NodePath = ApiRoute.PushMoneyToServer;
- t.ReqType = MultiType.POST;
- t.JsonParam = (new { Money, Type = 1, No = CardNo }).ToJson();
- }).Build().RunStringFirst();
- return bool.Parse(data.ToModel<JObject>()["data"].ToString());
- }
- }
- }
|