zhengyiming
2025-03-19 aef74aff62bd9fc2d615f8b15a100432f2bca44f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using 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; }
 
    }
}