LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
LifePayment/LifePayment.Domain/Common/ChannelFilter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
LifePayment/LifePayment.Domain/Common/ChannelHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
LifePayment/LifePayment.Domain/Common/UserChannle.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs
@@ -120,5 +120,11 @@ 图片 = 1, [Description("视频")] 视频 = 2 视频 = 2, [Description("富文本")] 富文本 = 3, [Description("微信的内容")] 微信的内容 = 4, } LifePayment/LifePayment.Domain/Common/AbstractChannelFilter.cs
@@ -14,12 +14,12 @@ { public abstract class AbstractChannelFilter { public abstract Task<IQueryable<TEntity>> GetPolicyFilter<TEntity, TKey>(IQueryable<TEntity> query) where TEntity : class, IChannelData, IMayHaveCreator, IEntity<TKey>; public abstract Task<IQueryable<ChannelsBase>> GetChannelFilter(IQueryable<ChannelsBase> query); public IAbpLazyServiceProvider LazyServiceProvider { get; set; } protected ICurrentUser CurrentUser => LazyServiceProvider.LazyGetRequiredService<ICurrentUser>(); protected IRepository<User> UserDepartmentRepository => LazyServiceProvider.LazyGetRequiredService<IRepository<User>>(); protected IRepository<UserChannle> UserChannleRepository => LazyServiceProvider.LazyGetRequiredService<IRepository<UserChannle>>(); } } LifePayment/LifePayment.Domain/Common/ChannelFilter.cs
@@ -1,21 +1,33 @@ using System; 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.Text; 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 Task<IQueryable<ChannelsBase>> GetPolicyFilter<ChannelsBase, TKey>(IQueryable<ChannelsBase> query) // { // throw new NotImplementedException(); // } //} 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:IChannelFilter //{ // // public Guid ChannelId { get; set; } //} public class ChannelsBase : Entity<Guid> { public Guid ChannleId { get; set; } } } LifePayment/LifePayment.Domain/Common/ChannelHelper.cs
@@ -36,7 +36,7 @@ public interface IChannelData { Guid ChannelId { get; set; } public Guid ChannleId { get; set; } } public class ChannelFilterInput LifePayment/LifePayment.Domain/Common/UserChannle.cs
@@ -8,7 +8,7 @@ /// <summary> /// 用户Id /// </summary> public virtual Guid UserId { get; set; } public Guid UserId { get; set; } /// <summary> /// 渠道Id LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs
@@ -149,6 +149,7 @@ cacheOptions.KeyPrefix = "LifePaymentServices_"; cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20); }); this.Configure<OssSettings>(configuration.GetSection("ossSettings")); this.Configure<ACOOLYOption>(configuration.GetSection("ACOOLY")); this.Configure<Config>("AliPayEcsign", configuration.GetSection("AliPayEcsign")); this.Configure<InformationOption>(configuration.GetSection("WeiXinCgi"));