From 596f4e4e04c138db4559276f0c9a21f4e9d21201 Mon Sep 17 00:00:00 2001 From: xxe Date: Fri, 9 Sep 2022 11:09:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HKCardIN/Helper/DataBus.cs | 4 ++-- HKCardIN/Logic/BaseLogic.cs | 4 ++-- HKCardOUT/Helper/DataBus.cs | 5 +++++ HKCardOUT/Logic/RemoteService.cs | 36 ++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 HKCardOUT/Logic/RemoteService.cs diff --git a/HKCardIN/Helper/DataBus.cs b/HKCardIN/Helper/DataBus.cs index 44e2a06..b8de17e 100644 --- a/HKCardIN/Helper/DataBus.cs +++ b/HKCardIN/Helper/DataBus.cs @@ -18,7 +18,7 @@ namespace HKCardIN.Helper } public class ApiRoute { - public const string PullUserAndCardInfo = ""; - public const string PushMoneyToServer = ""; + public static string PullUserAndCardInfo = DataBus.SaasRoute + ""; + public static string PushMoneyToServer = DataBus.SaasRoute + ""; } } diff --git a/HKCardIN/Logic/BaseLogic.cs b/HKCardIN/Logic/BaseLogic.cs index 572a113..f8db0bd 100644 --- a/HKCardIN/Logic/BaseLogic.cs +++ b/HKCardIN/Logic/BaseLogic.cs @@ -14,14 +14,14 @@ namespace HKCardIN.Logic { return await IHttpMultiClient.HttpMulti.AddNode(t => { - t.NodePath = DataBus.SaasRoute + ApiRoute.PullUserAndCardInfo; + t.NodePath = ApiRoute.PullUserAndCardInfo; }).Build().RunStringFirstAsync(); } public async Task PushMoneyToServer(dynamic input) { return await IHttpMultiClient.HttpMulti.AddNode(t => { - t.NodePath = DataBus.SaasRoute + ApiRoute.PushMoneyToServer; + t.NodePath = ApiRoute.PushMoneyToServer; }).Build().RunStringFirstAsync(); } } diff --git a/HKCardOUT/Helper/DataBus.cs b/HKCardOUT/Helper/DataBus.cs index 2f01623..74319e2 100644 --- a/HKCardOUT/Helper/DataBus.cs +++ b/HKCardOUT/Helper/DataBus.cs @@ -24,4 +24,9 @@ namespace HKCardOUT.Helper public static string Cron { get; set; } public static string SaasRoute { get; set; } } + public class ApiRoute + { + public static string CheckCardStatus = DataBus.SaasRoute + ""; + public static string SyncSaleLog = DataBus.SaasRoute + ""; + } } diff --git a/HKCardOUT/Logic/RemoteService.cs b/HKCardOUT/Logic/RemoteService.cs new file mode 100644 index 0000000..b002e3e --- /dev/null +++ b/HKCardOUT/Logic/RemoteService.cs @@ -0,0 +1,36 @@ +using HKCardOUT.Helper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using XExten.Advance.HttpFramework.MultiFactory; + +namespace HKCardOUT.Logic +{ + public class RemoteService + { + /// + /// 判断卡状态 + /// + /// + public static void CheckCardStuatas(string input) + { + IHttpMultiClient.HttpMulti.AddNode(t => + { + t.NodePath = ApiRoute.CheckCardStatus; + }).Build().RunStringFirst(); + } + /// + /// 同步消费记录 + /// + /// + public static void SyncSaleLog(dynamic input) + { + IHttpMultiClient.HttpMulti.AddNode(t => + { + t.NodePath = ApiRoute.SyncSaleLog; + }).Build().RunStringFirst(); + } + } +}