From 74f5570dceeb1a5a88c0a685705a9e4cc88881ce Mon Sep 17 00:00:00 2001 From: lingling <kety1122@163.com> Date: 星期三, 19 三月 2025 17:03:15 +0800 Subject: [PATCH] 格式化 --- LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs | 8 +++++--- LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs | 1 - LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 1 - LifePayment/LifePayment.Domain/Common/IChannelFilter.cs | 29 ----------------------------- LifePayment/LifePayment.Domain/Common/ChannelFilter.cs | 2 +- 5 files changed, 6 insertions(+), 35 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index e3fc6ef..5ce58d1 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -209,7 +209,6 @@ }) .GetPageResult(input.PageModel); } - } /// <summary> diff --git a/LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs b/LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs index 01758a1..e2fbefc 100644 --- a/LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs +++ b/LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs @@ -14,12 +14,14 @@ { public abstract class AbstractChannelFilter : IChannelFilter, ISingletonDependency { - public abstract IQueryable<LifePayOrder> GetChannelLifePayOrderFilter(IQueryable<LifePayOrder> query); - - public abstract IQueryable<LifePayUser> GetChannelLifePayUserFilter(IQueryable<LifePayUser> query); public IAbpLazyServiceProvider LazyServiceProvider { get; set; } + protected ICurrentUser CurrentUser => LazyServiceProvider.LazyGetRequiredService<ICurrentUser>(); protected IRepository<UserChannle> UserChannleRepository => LazyServiceProvider.LazyGetRequiredService<IRepository<UserChannle>>(); + + public abstract IQueryable<LifePayOrder> GetChannelLifePayOrderFilter(IQueryable<LifePayOrder> query); + + public abstract IQueryable<LifePayUser> GetChannelLifePayUserFilter(IQueryable<LifePayUser> query); } } diff --git a/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs b/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs index 521da7e..73aa4de 100644 --- a/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs +++ b/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs @@ -18,7 +18,7 @@ { public class ChannelFilter : AbstractChannelFilter { - public override IQueryable<LifePayOrder> GetChannelLifePayOrderFilter(IQueryable<LifePayOrder> query) + public override IQueryable<LifePayOrder> GetChannelLifePayOrderFilter(IQueryable<LifePayOrder> query) { if (CurrentUser.ClientId == Constant.ClientType.Back) { diff --git a/LifePayment/LifePayment.Domain/Common/IChannelFilter.cs b/LifePayment/LifePayment.Domain/Common/IChannelFilter.cs index 44235d7..cf568d3 100644 --- a/LifePayment/LifePayment.Domain/Common/IChannelFilter.cs +++ b/LifePayment/LifePayment.Domain/Common/IChannelFilter.cs @@ -7,37 +7,8 @@ { public interface IChannelFilter { - - public IQueryable<LifePayOrder> GetChannelLifePayOrderFilter(IQueryable<LifePayOrder> query); public IQueryable<LifePayUser> GetChannelLifePayUserFilter(IQueryable<LifePayUser> query); - - //public static IQueryable<T> GetChannleQuery<T>(this IQueryable<T> query, ChannelFilterInput input) where T : class, IChannelData - //{ - // if (query == null) - // { - // return query; - // } - // if (input.Channels != null && input.Channels.Any()) - // { - // query = query.Where(r => input.Channels.Contains(r.ChannelId)); - // } - // return query; - //} - } - - - - //public interface IChannelData - //{ - // public Guid ChannleId { get; set; } - //} - - //public class ChannelFilterInput - //{ - // public List<Guid> Channels { get; set; } = new List<Guid>(); - //} - } diff --git a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs index 4c5ff12..7b57d02 100644 --- a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs +++ b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs @@ -16,7 +16,6 @@ { } - public virtual DbSet<LifePayUser> LifePayUser { get; set; } public virtual DbSet<LifePayOrder> LifePayOrder { get; set; } -- Gitblit v1.9.1