From aef74aff62bd9fc2d615f8b15a100432f2bca44f Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 19 三月 2025 14:46:10 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentApi --- LifePayment/LifePayment.Domain/Common/ChannelFilter.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs b/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs new file mode 100644 index 0000000..f4d0a5e --- /dev/null +++ b/LifePayment/LifePayment.Domain/Common/ChannelFilter.cs @@ -0,0 +1,33 @@ +锘縰sing LifePayment.Application.Contracts; +using LifePayment.Domain; +using LifePayment.Domain.Models; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Z.EntityFramework.Plus; +using ZeroD.Util; + +namespace LifePayment.Domain.Common +{ + public class ChannelFilter : AbstractChannelFilter + { + public async override Task<IQueryable<ChannelsBase>> GetChannelFilter(IQueryable<ChannelsBase> query) + { + var queryUser = UserChannleRepository.Where(r => r.UserId == CurrentUser.Id).Select(s => s.ChannleId).ToList(); + var queryResult = query.Where(s => queryUser.Contains(s.ChannleId)); + return queryResult; + } + } + + public class ChannelsBase : Entity<Guid> + { + public Guid ChannleId { get; set; } + + } +} -- Gitblit v1.9.1