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.
29 lines
1.4 KiB
29 lines
1.4 KiB
using BBWY.Server.Model.Db.Mds;
|
|
using BBWYB.Common.Log;
|
|
using BBWYB.Common.Models;
|
|
using BBWYB.Server.Model;
|
|
using BBWYB.Server.Model.Dto;
|
|
using Yitter.IdGenerator;
|
|
|
|
namespace BBWYB.Server.Business
|
|
{
|
|
public class VenderBusiness : BaseBusiness, IDenpendency
|
|
{
|
|
private FreeSqlMultiDBManager fsqlManager;
|
|
public VenderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, FreeSqlMultiDBManager fsqlManager) : base(fsql, nLogManager, idGenerator)
|
|
{
|
|
this.fsqlManager = fsqlManager;
|
|
}
|
|
|
|
public IList<ShopResponse> GetShopList(long? shopId = null, Enums.Platform? platform = null, bool filterTurnoverDays = false, bool filterSiNan = false)
|
|
{
|
|
return fsqlManager.MDSfsql.Select<Shops>().Where(s => !string.IsNullOrEmpty(s.ShopId))
|
|
.WhereIf(shopId != null, s => s.ShopId == shopId.ToString())
|
|
.WhereIf(platform != null, s => s.PlatformId == (int)platform)
|
|
.WhereIf(filterTurnoverDays, s => s.SkuSafeTurnoverDays != 0)
|
|
.WhereIf(filterSiNan, s => !string.IsNullOrEmpty(s.SiNanDingDingWebHook))
|
|
.ToList<ShopResponse>();
|
|
}
|
|
|
|
}
|
|
}
|
|
|