You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
892 B
28 lines
892 B
using BBWY.Common.Http;
|
|
using BBWY.Server.Model;
|
|
using Microsoft.Extensions.Options;
|
|
using System.Linq;
|
|
|
|
namespace BBWY.Server.Business
|
|
{
|
|
public class BasePlatformRelayBusiness
|
|
{
|
|
protected RestApiService restApiService;
|
|
protected GlobalConfig globalConfig;
|
|
public BasePlatformRelayBusiness(RestApiService restApiService, IOptions<GlobalConfig> options)
|
|
{
|
|
this.restApiService = restApiService;
|
|
this.globalConfig = options.Value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取指定平台(云鼎/聚石塔/等)接口地址
|
|
/// </summary>
|
|
/// <param name="platform"></param>
|
|
/// <returns></returns>
|
|
protected string GetPlatformRelayAPIHost(Enums.Platform platform)
|
|
{
|
|
return globalConfig.PlatformAPIs.FirstOrDefault(p => p.Platform == platform).APIHost;
|
|
}
|
|
}
|
|
}
|
|
|