Quellcode durchsuchen

标准化接口

Lishi
xxe vor 2 Jahren
Ursprung
Commit
596f4e4e04
4 geänderte Dateien mit 45 neuen und 4 gelöschten Zeilen
  1. +2
    -2
      HKCardIN/Helper/DataBus.cs
  2. +2
    -2
      HKCardIN/Logic/BaseLogic.cs
  3. +5
    -0
      HKCardOUT/Helper/DataBus.cs
  4. +36
    -0
      HKCardOUT/Logic/RemoteService.cs

+ 2
- 2
HKCardIN/Helper/DataBus.cs Datei anzeigen

@@ -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 + "";
}
}

+ 2
- 2
HKCardIN/Logic/BaseLogic.cs Datei anzeigen

@@ -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<dynamic> PushMoneyToServer(dynamic input)
{
return await IHttpMultiClient.HttpMulti.AddNode(t =>
{
t.NodePath = DataBus.SaasRoute + ApiRoute.PushMoneyToServer;
t.NodePath = ApiRoute.PushMoneyToServer;
}).Build().RunStringFirstAsync();
}
}


+ 5
- 0
HKCardOUT/Helper/DataBus.cs Datei anzeigen

@@ -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 + "";
}
}

+ 36
- 0
HKCardOUT/Logic/RemoteService.cs Datei anzeigen

@@ -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
{
/// <summary>
/// 判断卡状态
/// </summary>
/// <param name="input"></param>
public static void CheckCardStuatas(string input)
{
IHttpMultiClient.HttpMulti.AddNode(t =>
{
t.NodePath = ApiRoute.CheckCardStatus;
}).Build().RunStringFirst();
}
/// <summary>
/// 同步消费记录
/// </summary>
/// <param name="input"></param>
public static void SyncSaleLog(dynamic input)
{
IHttpMultiClient.HttpMulti.AddNode(t =>
{
t.NodePath = ApiRoute.SyncSaleLog;
}).Build().RunStringFirst();
}
}
}

Laden…
Abbrechen
Speichern