|
@@ -6,6 +6,8 @@ using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
using System.Windows.Markup; |
|
|
|
|
|
using XExten.Advance.HttpFramework.MultiCommon; |
|
|
using XExten.Advance.HttpFramework.MultiFactory; |
|
|
using XExten.Advance.HttpFramework.MultiFactory; |
|
|
using XExten.Advance.LinqFramework; |
|
|
using XExten.Advance.LinqFramework; |
|
|
|
|
|
|
|
@@ -17,34 +19,38 @@ namespace HKCardOUT.Logic |
|
|
/// 判断卡状态 |
|
|
/// 判断卡状态 |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
/// <param name="input"></param> |
|
|
/// <param name="input"></param> |
|
|
public static void CheckCardStuatas(string input) |
|
|
|
|
|
|
|
|
public static int CheckCardStuatas(string CardNo) |
|
|
{ |
|
|
{ |
|
|
IHttpMultiClient.HttpMulti.AddNode(t => |
|
|
|
|
|
{ |
|
|
|
|
|
t.NodePath = ApiRoute.CheckCardStatus; |
|
|
|
|
|
}).Build().RunStringFirst(); |
|
|
|
|
|
|
|
|
return IHttpMultiClient.HttpMulti.AddNode(t => |
|
|
|
|
|
{ |
|
|
|
|
|
t.NodePath = ApiRoute.CheckCardStatus + CardNo; |
|
|
|
|
|
}).Build().RunStringFirst().ToModel<JObject>()["data"]["cardState"].ToString().AsInt(); |
|
|
} |
|
|
} |
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// 同步消费记录 |
|
|
/// 同步消费记录 |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
/// <param name="input"></param> |
|
|
|
|
|
public static void SyncSaleLog(dynamic input) |
|
|
|
|
|
|
|
|
/// <param name="CardNo"></param> |
|
|
|
|
|
/// <param name="Money"></param> |
|
|
|
|
|
public static bool SyncSaleLog(string CardNo, decimal Money) |
|
|
{ |
|
|
{ |
|
|
IHttpMultiClient.HttpMulti.AddNode(t => |
|
|
|
|
|
{ |
|
|
|
|
|
t.NodePath = ApiRoute.SyncSaleLog; |
|
|
|
|
|
}).Build().RunStringFirst(); |
|
|
|
|
|
|
|
|
var data = IHttpMultiClient.HttpMulti.AddNode(t => |
|
|
|
|
|
{ |
|
|
|
|
|
t.ReqType = MultiType.POST; |
|
|
|
|
|
t.JsonParam = (new { Money, Type = -1, CardNum = CardNo }).ToJson(); |
|
|
|
|
|
t.NodePath = ApiRoute.SyncSaleLog; |
|
|
|
|
|
}).Build().RunStringFirst(); |
|
|
|
|
|
return bool.Parse(data.ToModel<JObject>()["data"].ToString()); |
|
|
} |
|
|
} |
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// 获取店铺信息 |
|
|
/// 获取店铺信息 |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public static void PullShopInfo() |
|
|
public static void PullShopInfo() |
|
|
{ |
|
|
{ |
|
|
var data = IHttpMultiClient.HttpMulti.AddNode(t => |
|
|
|
|
|
{ |
|
|
|
|
|
t.NodePath = ApiRoute.PullShopInfo; |
|
|
|
|
|
}).Build().RunStringFirst() |
|
|
|
|
|
.ToModel<JObject>()["data"].ToJson().ToModel<StoreInfoResponse>(); |
|
|
|
|
|
|
|
|
var data = IHttpMultiClient.HttpMulti.AddNode(t => |
|
|
|
|
|
{ |
|
|
|
|
|
t.NodePath = ApiRoute.PullShopInfo; |
|
|
|
|
|
}).Build().RunStringFirst() |
|
|
|
|
|
.ToModel<JObject>()["data"].ToJson().ToModel<StoreInfoResponse>(); |
|
|
DataBus.StoreInfo = data; |
|
|
DataBus.StoreInfo = data; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|