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.
|
|
|
using BBWY.Common.Models;
|
|
|
|
using BBWY.Server.Model;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using Yitter.IdGenerator;
|
|
|
|
namespace BBWY.Server.Business
|
|
|
|
{
|
|
|
|
public class BaseBusiness
|
|
|
|
{
|
|
|
|
protected IFreeSql fsql;
|
|
|
|
protected NLogManager nLogManager;
|
|
|
|
protected IIdGenerator idGenerator;
|
|
|
|
protected IEnumerable<PlatformSDKBusiness> platformSDKBusinessList;
|
|
|
|
|
|
|
|
public BaseBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, IEnumerable<PlatformSDKBusiness> platformSDKBusinessList)
|
|
|
|
{
|
|
|
|
this.fsql = fsql;
|
|
|
|
this.nLogManager = nLogManager;
|
|
|
|
this.idGenerator = idGenerator;
|
|
|
|
this.platformSDKBusinessList = platformSDKBusinessList;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PlatformSDKBusiness GetPlatformSDKBusiness(Enums.Platform platofrm)
|
|
|
|
{
|
|
|
|
var pb = platformSDKBusinessList.FirstOrDefault(p => p.Platform == platofrm);
|
|
|
|
if (pb == null)
|
|
|
|
throw new BusinessException($"不支持平台{platofrm}");
|
|
|
|
return pb;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|