From b525fe659614934f253ed9c8b59c38cfebb3bc15 Mon Sep 17 00:00:00 2001 From: lingling <kety1122@163.com> Date: 星期三, 19 三月 2025 13:21:07 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentApi --- LifePayment/LifePayment.Domain/LifePay/LifePayIntroInfo.cs | 43 +++ LifePayment/LifePayment.Domain/LifePay/LifePayChannles.cs | 2 LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml | 128 +++++++++++ LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs | 2 LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs | 10 LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 56 +++++ LifePayment/LifePayment.Application/User/AccountService.cs | 2 LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs | 6 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs | 2 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 103 +++++++++ LifePayment/LifePayment.Domain/Common/User.cs | 7 LifePayment/LifePayment.Application/User/UserRoleService.cs | 34 ++ LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs | 24 ++ LifePayment/LifePayment.Domain/Common/UserChannle.cs | 19 + LifePayment/LifePayment.Domain/LifePay/LifePayPremium.cs | 17 + LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs | 33 +++ LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs | 12 + LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 31 ++ LifePayment/LifePayment.rar | 0 LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 126 ++++++++++- 20 files changed, 633 insertions(+), 24 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs index 93d2726..70adeed 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs @@ -113,13 +113,44 @@ Task SetLifePayChannelsStatus(Guid id, LifePayChannelsStatsEnum status); + /// <summary> + /// 缂栬緫鎶樻墸 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> Task CreateEditLifePayRate(List<LifePayRateInput> input); + + /// <summary> + /// 缂栬緫鎵嬬画璐硅垂鐜� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + Task CreateEditLifePayPremium(List<LifePayPremiumInput> input); + + /// <summary> + /// 椤荤煡閰嶇疆 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + Task EditIntroInfo(LifePayIntroInfoInput input); /// <summary> /// 鑾峰彇鎶樻墸 /// </summary> /// <returns></returns> Task<List<LifePayRateListOutput>> GetRate(); + + /// <summary> + /// 鑾峰彇鎵嬬画璐硅垂鐜� + /// </summary> + /// <returns></returns> + Task<List<LifePayPremiumListOutput>> GetPremium(); + + /// <summary> + /// 鑾峰彇椤荤煡 + /// </summary> + /// <returns></returns> + Task<List<LifePayIntroInfoOutput>> GetIntroInfo(LifePayOrderTypeEnum type); /// <summary> /// 鑾峰彇鎴戠殑璁㈠崟鍒嗛〉鏁版嵁 @@ -171,6 +202,8 @@ /// <returns></returns> Task<PageOutput<CreateEditPayChannelsInput>> GetLifePayChannlesPage(PageInput input); + Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList(); + Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id); diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs index bb116ab..d0353ba 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs @@ -315,6 +315,8 @@ public decimal ChannlesRate { get; set; } + public decimal ChannlesRakeRate { get; set; } + public LifePaySwitchTypeEnum SwitchType { get; set; } public LifePayChannelsStatsEnum Status { get; set; } diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs index 2a06944..38e0d09 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs @@ -1,5 +1,6 @@ 锘縰sing LifePayment.Domain.Shared; using System; +using System.Collections.Generic; using ZeroD.Base.Web.Models; namespace LifePayment.Application.Contracts; @@ -21,6 +22,98 @@ public Guid? Id { get; set; } } +public class LifePayPremiumInput +{ + public LifePayTypeEnum PremiumType { get; set; } + + public decimal Rate { get; set; } + + public Guid? Id { get; set; } +} + +public class LifePayIntroInfoInput +{ + /// <summary> + /// 鐢熸椿缂磋垂绫诲瀷 + /// </summary> + public LifePayOrderTypeEnum LifePayType { get; set; } + + /// <summary> + /// 鏇存柊鍐呭 + /// </summary> + public List<LifePayIntroInfoDetail> Data { get; set; } +} + +public class LifePayIntroInfoDetail +{ + /// <summary> + /// 绫诲瀷 + /// </summary> + public IntroInfoTypeEnum Type { get; set; } + + /// <summary> + /// 鎽樿 + /// </summary> + public string ContentSummary { get; set; } + + /// <summary> + /// 鏂囨湰鍐呭 + /// </summary> + public string Content { get; set; } + + /// <summary> + /// 鍥剧墖/瑙嗛璺緞 + /// </summary> + public string Path { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int Sequence { get; set; } +} + +public class LifePayPremiumListOutput +{ + public LifePayTypeEnum PremiumType { get; set; } + + public decimal Rate { get; set; } + + public Guid Id { get; set; } +} + +public class LifePayIntroInfoOutput +{ + /// <summary> + /// 绫诲瀷 + /// </summary> + public IntroInfoTypeEnum Type { get; set; } + + + /// <summary> + /// 鐢熸椿缂磋垂绫诲瀷 + /// </summary> + public LifePayOrderTypeEnum LifePayType { get; set; } + + /// <summary> + /// 鎽樿 + /// </summary> + public string ContentSummary { get; set; } + + /// <summary> + /// 鏂囨湰鍐呭 + /// </summary> + public string Content { get; set; } + + /// <summary> + /// 鍥剧墖/瑙嗛璺緞 + /// </summary> + public string Path { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int Sequence { get; set; } +} public class UserListOutput { @@ -31,6 +124,16 @@ /// </summary> public string PhoneNumber { get; set; } + /// <summary> + /// 鏈�鍚庣櫥褰曟笭閬� + /// </summary> + public string CreationChannle { get; set; } + + /// <summary> + /// 鏈�鍚庣櫥褰曟笭閬� + /// </summary> + public string LastLoginChannle { get; set; } + public DateTime? LastLoginTime { get; set; } public DateTime? CreationTime { get; set; } diff --git a/LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs b/LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs index d1f3f9e..74cce24 100644 --- a/LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs +++ b/LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs @@ -29,6 +29,11 @@ public string[] RoleNames { get; set; } /// <summary> + /// 娓犻亾鍒楄〃 + /// </summary> + public Guid[] ChannlesId { get; set; } + + /// <summary> /// 缁勭粐鏋舵瀯鍏徃id /// </summary> public Guid? CompanyOrgId { get; set; } @@ -131,6 +136,12 @@ /// </summary> public IEnumerable<RoleDto> Roles { get; set; } + + /// <summary> + /// 瑙掕壊淇℃伅 + /// </summary> + public IEnumerable<UserChannleDto> Channles { get; set; } + /// <summary> /// 澶囨敞 /// </summary> @@ -215,6 +226,19 @@ public string Remark { get; set; } } + public class UserChannleDto + { + /// <summary> + /// 娓犻亾Id + /// </summary> + public Guid Id { get; set; } + + /// <summary> + /// 娓犻亾鍚� + /// </summary> + public string Name { get; set; } + } + public class GetRolesInput : PageInput { /// <summary> diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 5338c44..df3cda1 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -25,9 +25,10 @@ using ZeroD.Util; using ZeroD.Util.Fadd; using static LifePayment.Domain.Shared.LifePaymentConstant; -using static IdentityServer4.Models.IdentityResources; using Volo.Abp.Data; using Z.EntityFramework.Plus; +using LifePayment.Domain.LifePay; +using pingan.openbank.api.sdk.enums; namespace LifePayment.Application; @@ -37,8 +38,10 @@ private readonly ILogger<LifePayService> _logger; private readonly IRepository<LifePayRate, Guid> _lifePayRateRepository; + private readonly IRepository<LifePayPremium, Guid> _lifePayPremiumRepository; private readonly IRepository<LifePayOrder, Guid> _lifePayOrderRepository; private readonly IRepository<LifePayUser, Guid> _lifePayUserRepository; + private readonly IRepository<LifePayIntroInfo, Guid> _lifePayIntroInfoRepository; private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep; private readonly IRepository<LifePayAccount, Guid> _lifePayAccount; private readonly IDataFilter dataFilter; @@ -55,6 +58,8 @@ IRepository<LifePayRate, Guid> lifePayRateRepository, IRepository<LifePayOrder, Guid> lifePayOrderRepository, IRepository<LifePayUser, Guid> lifePayUserRepository, + IRepository<LifePayPremium, Guid> lifePayPremiumRepository, + IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository, IAliPayApi aliPayApi, IWxPayApi wxPayApi, IOptions<WxPayOption> wxPayOptions, @@ -67,6 +72,8 @@ _lifePayRateRepository = lifePayRateRepository; _lifePayOrderRepository = lifePayOrderRepository; _lifePayUserRepository = lifePayUserRepository; + _lifePayPremiumRepository = lifePayPremiumRepository; + _lifePayIntroInfoRepository = lifePayIntroInfoRepository; _aliPayApi = aliPayApi; _wxPayApi = wxPayApi; _wxPayOptions = wxPayOptions.Value; @@ -137,16 +144,40 @@ } /// <summary> + /// 鑾峰彇鎵嬬画璐硅垂鐜� + /// </summary> + /// <returns></returns> + public async Task<List<LifePayPremiumListOutput>> GetPremium() + { + return await _lifePayPremiumRepository.Where(x => x.IsDeleted == false).Select(x => new LifePayPremiumListOutput() { Id = x.Id, Rate = x.Rate, PremiumType = x.PremiumType }) + .ToListAsync(); + } + + /// <summary> + /// 椤荤煡閰嶇疆 + /// </summary> + /// <returns></returns> + public async Task<List<LifePayIntroInfoOutput>> GetIntroInfo(LifePayOrderTypeEnum lifePayType) + { + return await _lifePayIntroInfoRepository.Where(x => x.IsDeleted == false && x.LifePayType == lifePayType).OrderBy(x => x.Sequence) + .Select(x => new LifePayIntroInfoOutput() { Type = x.Type, ContentSummary = x.ContentSummary, Content = x.Content, LifePayType = x.LifePayType,Path = x.Path,Sequence = x.Sequence }) + .ToListAsync(); + } + + /// <summary> /// 鑾峰彇鐢ㄦ埛鍒嗛〉鏁版嵁 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task<PageOutput<UserListOutput>> GetUserPage(PageInput input) { + var channel = await _lifePayChannlesRep.ToListAsync(); return await _lifePayUserRepository.Select(x => new UserListOutput() { Id = x.Id, + //CreationChannle = string.IsNullOrEmpty(x.CreationChannleNum) ? "" : channel.Where(c => c.ChannlesNum == x.CreationChannleNum).FirstOrDefault().ChannlesName, + //LastLoginChannle = string.IsNullOrEmpty(x.LastLoginChannleNum) ? "" : channel.Where(c => c.ChannlesNum == x.LastLoginChannleNum).FirstOrDefault().ChannlesName, PhoneNumber = x.PhoneNumber, CreationTime = x.CreationTime, LastLoginTime = x.LastLoginTime @@ -324,19 +355,12 @@ public async Task<PageOutput<CreateEditPayChannelsInput>> GetLifePayChannlesPage(PageInput input) { + return await GetLifePayChannlesListFilter().GetPageResult(input.PageModel); + } - return await _lifePayChannlesRep.Select(x => - new CreateEditPayChannelsInput - { - Id = x.Id, - ChannlesRate = x.ChannlesRate, - ChannlesName = x.ChannlesName, - ChannlesNum = x.ChannlesNum, - Status = x.Status, - SwitchType = x.SwitchType, - ChannlesType = x.ChannlesType, - }) - .GetPageResult(input.PageModel); + public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList() + { + return await GetLifePayChannlesListFilter().Where(x => x.Status == LifePayChannelsStatsEnum.鍚敤).ToListAsync(); } public async Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id) @@ -346,6 +370,7 @@ { Id = x.Id, ChannlesRate = x.ChannlesRate, + ChannlesRakeRate = x.ChannlesRakeRate, ChannlesName = x.ChannlesName, ChannlesNum = x.ChannlesNum, Status = x.Status, @@ -361,6 +386,7 @@ { Id = x.Id, ChannlesRate = x.ChannlesRate, + ChannlesRakeRate = x.ChannlesRakeRate, ChannlesName = x.ChannlesName, ChannlesNum = x.ChannlesNum, Status = x.Status, @@ -1172,6 +1198,7 @@ dto.ChannlesName = input.ChannlesName; dto.ChannlesNum = input.ChannlesNum; dto.ChannlesRate = input.ChannlesRate; + dto.ChannlesRakeRate = input.ChannlesRakeRate; dto.SwitchType = input.SwitchType; dto.ChannlesType = input.ChannlesType; dto.Status = input.Status; @@ -1219,6 +1246,7 @@ CheckExtensions.IfTrueThrowUserFriendlyException(dto.Status == LifePayChannelsStatsEnum.绂佺敤, "褰撳墠娓犻亾鍟嗗凡绂佺敤"); return true; } + public async Task CreateEditLifePayRate(List<LifePayRateInput> input) { CheckExtensions.IfTrueThrowUserFriendlyException(input.Where(r => r.Rate <= 0).Any(), "鎶樻墸涓嶅緱灏忎簬绛変簬0"); @@ -1248,11 +1276,62 @@ { await _lifePayRateRepository.InsertManyAsync(listData); } - } + public async Task CreateEditLifePayPremium(List<LifePayPremiumInput> input) + { + CheckExtensions.IfTrueThrowUserFriendlyException(input.Where(r => r.Rate < 0).Any(), "鎶樻墸涓嶅緱灏忎簬0"); + var listData = new List<LifePayPremium>(); + foreach (var item in input) + { + var tmpDto = await _lifePayPremiumRepository.FirstOrDefaultAsync(r => r.PremiumType == item.PremiumType); + if (tmpDto != null) + { + tmpDto.Rate = item.Rate; + } + else + { + listData.Add(new LifePayPremium + { + CreationTime = DateTime.Now, + Rate = item.Rate, + PremiumType = item.PremiumType, + Id = Guid.NewGuid(), + }); + } + } + if (listData.Any()) + { + await _lifePayPremiumRepository.InsertManyAsync(listData); + } + } + public async Task EditIntroInfo(LifePayIntroInfoInput input) + { + var listData = new List<LifePayIntroInfo>(); + foreach (var item in input.Data) + { + var tmpDto = await _lifePayIntroInfoRepository.Where(r => r.LifePayType == input.LifePayType).DeleteAsync(); + + listData.Add(new LifePayIntroInfo + { + LifePayType = input.LifePayType, + CreationTime = DateTime.Now, + Type = item.Type, + ContentSummary = item.ContentSummary, + Content = item.Content, + Path = item.Path, + Sequence = item.Sequence, + Id = Guid.NewGuid(), + }); + } + + if (listData.Any()) + { + await _lifePayIntroInfoRepository.InsertManyAsync(listData); + } + } #endregion #region 绉佹湁 @@ -1503,6 +1582,21 @@ return result; } + private IQueryable<CreateEditPayChannelsInput> GetLifePayChannlesListFilter() + { + return _lifePayChannlesRep.Select(x => + new CreateEditPayChannelsInput + { + Id = x.Id, + ChannlesRate = x.ChannlesRate, + ChannlesRakeRate = x.ChannlesRakeRate, + ChannlesName = x.ChannlesName, + ChannlesNum = x.ChannlesNum, + Status = x.Status, + SwitchType = x.SwitchType, + ChannlesType = x.ChannlesType, + }); + } - #endregion -} + #endregion + } diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs index 96b3ae8..bf2d4e3 100644 --- a/LifePayment/LifePayment.Application/User/AccountService.cs +++ b/LifePayment/LifePayment.Application/User/AccountService.cs @@ -92,6 +92,7 @@ lifeUser = new LifePayUser() { Id = GuidGenerator.Create(), + CreationChannleNum = input.CheckChannelId, PhoneNumber = input.PhoneNumber, LastLoginTime = DateTime.Now }; @@ -100,6 +101,7 @@ } else { + lifeUser.LastLoginChannleNum = input.CheckChannelId; lifeUser.LastLoginTime = DateTime.Now; await _lifePayUserRepository.UpdateAsync(lifeUser); } diff --git a/LifePayment/LifePayment.Application/User/UserRoleService.cs b/LifePayment/LifePayment.Application/User/UserRoleService.cs index 057e212..97fbd78 100644 --- a/LifePayment/LifePayment.Application/User/UserRoleService.cs +++ b/LifePayment/LifePayment.Application/User/UserRoleService.cs @@ -1,4 +1,5 @@ 锘縰sing LifePayment.Application.Contracts; +using LifePayment.Domain; using LifePayment.Domain.Models; using Microsoft.EntityFrameworkCore; using System; @@ -8,6 +9,7 @@ using Volo.Abp; using Volo.Abp.Application.Services; using Volo.Abp.Domain.Repositories; +using Z.EntityFramework.Plus; using ZeroD.Util; namespace HumanResourcesServices.Application @@ -16,21 +18,27 @@ { private readonly IRepository<User, Guid> _userRepository; private readonly IRepository<Role, Guid> _roleRepository; + private readonly IRepository<LifePayChannles, Guid> _channleRepository; private readonly IRepository<UserRole, Guid> _userRoleRep; + private readonly IRepository<UserChannle, Guid> _userChannleRep; public UserRoleService( IRepository<User, Guid> userRepository, IRepository<Role, Guid> roleRepository, - IRepository<UserRole, Guid> userRoleRep) + IRepository<LifePayChannles, Guid> channleRepository, + IRepository<UserRole, Guid> userRoleRep, + IRepository<UserChannle, Guid> userChannleRep) { _userRepository = userRepository; _roleRepository = roleRepository; + _channleRepository = channleRepository; _userRoleRep = userRoleRep; + _userChannleRep = userChannleRep; } public async Task<PageOutput<UserDto>> GetBackClientUsers(GetBackClientUsersInput input) { - var query = _userRepository.Where(s => s.ClientId == Constant.ClientType.Back).Include(i => i.UserRoles).Select(u => new UserDto + var query = _userRepository.Where(s => s.ClientId == Constant.ClientType.Back).Include(i => i.UserRoles).Include(i => i.UserChannle).Select(u => new UserDto { Id = u.Id, UserName = u.UserName, @@ -43,6 +51,13 @@ { Id = r.Id, Name = r.Name, + }, + Channles = from uc in u.UserChannle + from c in _channleRepository.Where(s => s.Id == uc.ChannleId) + select new UserChannleDto + { + Id = c.Id, + Name = c.ChannlesName, }, Remark = u.Remark, CompanyOrgId = u.CompanyOrgId, @@ -77,6 +92,21 @@ entity.Remark = input.Remark; entity.DepartmentOrgId = input.DepartmentOrgId; entity.CompanyOrgId = input.CompanyOrgId; + + var userchannle = await _userChannleRep.Where(s => s.UserId == input.Id).DeleteAsync(); + List<UserChannle> userChannles = new List<UserChannle>(); + foreach (var item in input.ChannlesId) + { + userChannles.Add(new UserChannle() + { + Id = Guid.NewGuid(), + ChannleId = item, + UserId = entity.Id + }); + } + + await _userChannleRep.InsertManyAsync(userChannles); + return Constant.SUCCESS; } diff --git a/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs index c0bcca7..5f4a93e 100644 --- a/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs +++ b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs @@ -89,7 +89,6 @@ 渚涘簲鍟嗘姌鎵d环=40, } - public enum LifePaySwitchTypeEnum { H5 = 10, @@ -111,4 +110,15 @@ 鍐呴儴娓犻亾 = 10, 澶栭儴娓犻亾 = 20, +} +public enum IntroInfoTypeEnum +{ + [Description("鏂囨湰")] + 鏂囨湰 = 0, + + [Description("鍥剧墖")] + 鍥剧墖 = 1, + + [Description("瑙嗛")] + 瑙嗛 = 2 } \ No newline at end of file diff --git a/LifePayment/LifePayment.Domain/Common/User.cs b/LifePayment/LifePayment.Domain/Common/User.cs index 92cdc42..48ddd89 100644 --- a/LifePayment/LifePayment.Domain/Common/User.cs +++ b/LifePayment/LifePayment.Domain/Common/User.cs @@ -10,9 +10,8 @@ { public User() { - UserRoles = new HashSet<UserRole>(); - + UserChannle = new HashSet<UserChannle>(); } /// <summary> @@ -180,10 +179,8 @@ /// </summary> public Guid? IndustrialParkId { get; set; } - - public ICollection<UserRole> UserRoles { get; set; } - + public ICollection<UserChannle> UserChannle { get; set; } } } \ No newline at end of file diff --git a/LifePayment/LifePayment.Domain/Common/UserChannle.cs b/LifePayment/LifePayment.Domain/Common/UserChannle.cs new file mode 100644 index 0000000..b4b9c3d --- /dev/null +++ b/LifePayment/LifePayment.Domain/Common/UserChannle.cs @@ -0,0 +1,19 @@ +锘縰sing System; +using Volo.Abp.Domain.Entities; + +namespace LifePayment.Domain.Models +{ + public class UserChannle : Entity<Guid> + { + /// <summary> + /// 鐢ㄦ埛Id + /// </summary> + public virtual Guid UserId { get; set; } + + /// <summary> + /// 娓犻亾Id + /// </summary> + public virtual Guid ChannleId { get; set; } + public virtual User User { get; set; } + } +} \ No newline at end of file diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayChannles.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayChannles.cs index 64ee759..e214888 100644 --- a/LifePayment/LifePayment.Domain/LifePay/LifePayChannles.cs +++ b/LifePayment/LifePayment.Domain/LifePay/LifePayChannles.cs @@ -17,6 +17,8 @@ public decimal ChannlesRate { get; set; } + public decimal ChannlesRakeRate { get; set; } + public LifePaySwitchTypeEnum SwitchType { get; set; } public LifePayChannelsStatsEnum Status { get; set; } diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayIntroInfo.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayIntroInfo.cs new file mode 100644 index 0000000..d4411e5 --- /dev/null +++ b/LifePayment/LifePayment.Domain/LifePay/LifePayIntroInfo.cs @@ -0,0 +1,43 @@ +锘縰sing LifePayment.Domain.Shared; +using System; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; + +namespace LifePayment.Domain.LifePay; + +public partial class LifePayIntroInfo : FullAuditedEntity<Guid>, IDataUserFilter +{ + public LifePayIntroInfo() + { + } + + /// <summary> + /// 绫诲瀷 + /// </summary> + public IntroInfoTypeEnum Type { get; set; } + + /// <summary> + /// 鐢熸椿缂磋垂绫诲瀷 + /// </summary> + public LifePayOrderTypeEnum LifePayType { get; set; } + + /// <summary> + /// 鎽樿 + /// </summary> + public string ContentSummary { get; set; } + + /// <summary> + /// 鏂囨湰鍐呭 + /// </summary> + public string Content { get; set; } + + /// <summary> + /// 鍥剧墖/瑙嗛璺緞 + /// </summary> + public string Path { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int Sequence { get; set; } +} \ No newline at end of file diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayPremium.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayPremium.cs new file mode 100644 index 0000000..1e74747 --- /dev/null +++ b/LifePayment/LifePayment.Domain/LifePay/LifePayPremium.cs @@ -0,0 +1,17 @@ +锘縰sing LifePayment.Domain.Shared; +using System; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; + +namespace LifePayment.Domain; + +public partial class LifePayPremium : FullAuditedEntity<Guid>, IDataUserFilter +{ + public LifePayPremium() + { + } + + public LifePayTypeEnum PremiumType { get; set; } + + public decimal Rate { get; set; } +} \ No newline at end of file diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs index bad9e84..e326820 100644 --- a/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs +++ b/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs @@ -20,8 +20,18 @@ /// </summary> public string OpenId { get; set; } + /// <summary> + /// 娉ㄥ唽娓犻亾缂栧彿 + /// </summary> + public string CreationChannleNum { get; set; } + public string UnionId { get; set; } public DateTime? LastLoginTime { get; set; } + + /// <summary> + /// 鏈�鍚庣櫥褰曟笭閬撶紪鍙� + /// </summary> + public string LastLoginChannleNum { get; set; } } } \ No newline at end of file diff --git a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs index 15260dc..4c5ff12 100644 --- a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs +++ b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs @@ -1,4 +1,5 @@ using LifePayment.Domain; +using LifePayment.Domain.LifePay; using LifePayment.Domain.Models; using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; @@ -22,15 +23,20 @@ public virtual DbSet<LifePayRate> LifePayRate { get; set; } + public virtual DbSet<LifePayPremium> LifePayPremium { get; set; } + public virtual DbSet<Area> Area { get; set; } public virtual DbSet<User> Users { get; set; } public virtual DbSet<Role> Roles { get; set; } + public virtual DbSet<LifePayIntroInfo> LifePayIntroInfo { get; set; } public virtual DbSet<UserRole> UserRoles { get; set; } + public virtual DbSet<UserChannle> UserChannle { get; set; } + public virtual DbSet<OperateHistory> OperateHistory { get; set; } public virtual DbSet<LifePayChannles> LifePayChannles { get; set; } diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml index c612514..8fbb84f 100644 --- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml +++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml @@ -98,6 +98,18 @@ </summary> <returns></returns> </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetPremium"> + <summary> + 鑾峰彇鎵嬬画璐硅垂鐜� + </summary> + <returns></returns> + </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetIntroInfo(LifePayment.Domain.Shared.LifePayOrderTypeEnum)"> + <summary> + 鑾峰彇椤荤煡 + </summary> + <returns></returns> + </member> <member name="M:LifePayment.HttpApi.LifePayController.GetUserPage(ZeroD.Util.PageInput)"> <summary> 鑾峰彇鐢ㄦ埛鍒嗛〉鏁版嵁 @@ -139,6 +151,11 @@ </summary> <param name="input"></param> <returns></returns> + </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesAllList"> + <summary> + 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 + </summary> </member> <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesDto(System.Guid)"> <summary> @@ -270,6 +287,20 @@ <param name="input"></param> <returns></returns> </member> + <member name="M:LifePayment.HttpApi.LifePayController.CreateEditLifePayPremium(System.Collections.Generic.List{LifePayment.Application.Contracts.LifePayPremiumInput})"> + <summary> + 鎵嬬画璐硅垂鐜囬厤缃� + </summary> + <param name="input"></param> + <returns></returns> + </member> + <member name="M:LifePayment.HttpApi.LifePayController.EditIntroInfo(LifePayment.Application.Contracts.LifePayIntroInfoInput)"> + <summary> + 椤荤煡閰嶇疆 + </summary> + <param name="input"></param> + <returns></returns> + </member> <member name="M:LifePayment.HttpApi.LifePayController.SetLifePayOrderPayType(LifePayment.Domain.Shared.SetLifePayOrderPayTypeInput)"> <summary> 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷 diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml index 5ce8457..cc63059 100644 --- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml +++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml @@ -101,9 +101,42 @@ <param name="id"></param> <returns></returns> </member> + <member name="M:LifePayment.Application.Contracts.ILifePayService.CreateEditLifePayRate(System.Collections.Generic.List{LifePayment.Application.Contracts.LifePayRateInput})"> + <summary> + 缂栬緫鎶樻墸 + </summary> + <param name="input"></param> + <returns></returns> + </member> + <member name="M:LifePayment.Application.Contracts.ILifePayService.CreateEditLifePayPremium(System.Collections.Generic.List{LifePayment.Application.Contracts.LifePayPremiumInput})"> + <summary> + 缂栬緫鎵嬬画璐硅垂鐜� + </summary> + <param name="input"></param> + <returns></returns> + </member> + <member name="M:LifePayment.Application.Contracts.ILifePayService.EditIntroInfo(LifePayment.Application.Contracts.LifePayIntroInfoInput)"> + <summary> + 椤荤煡閰嶇疆 + </summary> + <param name="input"></param> + <returns></returns> + </member> <member name="M:LifePayment.Application.Contracts.ILifePayService.GetRate"> <summary> 鑾峰彇鎶樻墸 + </summary> + <returns></returns> + </member> + <member name="M:LifePayment.Application.Contracts.ILifePayService.GetPremium"> + <summary> + 鑾峰彇鎵嬬画璐硅垂鐜� + </summary> + <returns></returns> + </member> + <member name="M:LifePayment.Application.Contracts.ILifePayService.GetIntroInfo(LifePayment.Domain.Shared.LifePayOrderTypeEnum)"> + <summary> + 鑾峰彇椤荤煡 </summary> <returns></returns> </member> @@ -463,9 +496,84 @@ 澶囨敞 </summary> </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoInput.LifePayType"> + <summary> + 鐢熸椿缂磋垂绫诲瀷 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoInput.Data"> + <summary> + 鏇存柊鍐呭 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoDetail.Type"> + <summary> + 绫诲瀷 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoDetail.ContentSummary"> + <summary> + 鎽樿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoDetail.Content"> + <summary> + 鏂囨湰鍐呭 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoDetail.Path"> + <summary> + 鍥剧墖/瑙嗛璺緞 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoDetail.Sequence"> + <summary> + 鎺掑簭 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoOutput.Type"> + <summary> + 绫诲瀷 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoOutput.LifePayType"> + <summary> + 鐢熸椿缂磋垂绫诲瀷 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoOutput.ContentSummary"> + <summary> + 鎽樿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoOutput.Content"> + <summary> + 鏂囨湰鍐呭 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoOutput.Path"> + <summary> + 鍥剧墖/瑙嗛璺緞 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoOutput.Sequence"> + <summary> + 鎺掑簭 + </summary> + </member> <member name="P:LifePayment.Application.Contracts.UserListOutput.PhoneNumber"> <summary> 鐢ㄦ埛鎵嬫満鍙� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.UserListOutput.CreationChannle"> + <summary> + 鏈�鍚庣櫥褰曟笭閬� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.UserListOutput.LastLoginChannle"> + <summary> + 鏈�鍚庣櫥褰曟笭閬� </summary> </member> <member name="P:LifePayment.Application.Contracts.LifePayOrderListOutput.PhoneNumber"> @@ -1358,6 +1466,11 @@ 瑙掕壊 </summary> </member> + <member name="P:LifePayment.Application.Contracts.CreateBackClientUserInput.ChannlesId"> + <summary> + 娓犻亾鍒楄〃 + </summary> + </member> <member name="P:LifePayment.Application.Contracts.CreateBackClientUserInput.CompanyOrgId"> <summary> 缁勭粐鏋舵瀯鍏徃id @@ -1443,6 +1556,11 @@ 瑙掕壊淇℃伅 </summary> </member> + <member name="P:LifePayment.Application.Contracts.UserDto.Channles"> + <summary> + 瑙掕壊淇℃伅 + </summary> + </member> <member name="P:LifePayment.Application.Contracts.UserDto.Remark"> <summary> 澶囨敞 @@ -1518,6 +1636,16 @@ 澶囨敞 </summary> </member> + <member name="P:LifePayment.Application.Contracts.UserChannleDto.Id"> + <summary> + 娓犻亾Id + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.UserChannleDto.Name"> + <summary> + 娓犻亾鍚� + </summary> + </member> <member name="P:LifePayment.Application.Contracts.GetRolesInput.QueryCondition"> <summary> 鏌ヨ鏉′欢锛氳鑹插悕绉� diff --git a/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs index 3c685ec..8e0e2b9 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs @@ -63,6 +63,8 @@ orderNo = confirmElectricOrderResponse.ElectricChargeOrder.OutOrderNo; acoolyOrderNo = confirmElectricOrderResponse.ElectricChargeOrder.BusiOrderNo; _logger.LogError("ACOOLY鍥炶皟閫氬鐞嗙粨鏋滅姸鎬侊細" + confirmElectricOrderResponse.ElectricChargeOrder.Status); + + /// TODO 鐘舵�佷笉姝g‘ if (!confirmElectricOrderResponse.Success || (confirmElectricOrderResponse.Code != ACOOLYConstant.Code.SUCCESS && confirmElectricOrderResponse.Code != ACOOLYConstant.Code.PROCESSING)) { diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs index c911bc7..41d72d7 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs @@ -136,6 +136,29 @@ } /// <summary> + /// 鑾峰彇鎵嬬画璐硅垂鐜� + /// </summary> + /// <returns></returns> + [HttpGet] + [AllowAnonymous] + public async Task<List<LifePayPremiumListOutput>> GetPremium() + { + return await _lifePayService.GetPremium(); + } + + /// <summary> + /// 鑾峰彇椤荤煡 + /// </summary> + /// <returns></returns> + [HttpGet] + [AllowAnonymous] + public async Task<List<LifePayIntroInfoOutput>> GetIntroInfo(LifePayOrderTypeEnum type) + { + return await _lifePayService.GetIntroInfo(type); + } + + + /// <summary> /// 鑾峰彇鐢ㄦ埛鍒嗛〉鏁版嵁 /// </summary> /// <param name="input"></param> @@ -205,6 +228,15 @@ public async Task<PageOutput<CreateEditPayChannelsInput>> GetLifePayChannlesPage(PageInput input) { return await _lifePayService.GetLifePayChannlesPage(input); + } + + /// <summary> + /// 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 + /// </summary> + [HttpGet] + public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList() + { + return await _lifePayService.GetLifePayChannlesAllList(); } /// <summary> @@ -446,6 +478,30 @@ } /// <summary> + /// 鎵嬬画璐硅垂鐜囬厤缃� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + public async Task<int> CreateEditLifePayPremium(List<LifePayPremiumInput> input) + { + await _lifePayService.CreateEditLifePayPremium(input); + return Constant.SUCCESS; + } + + /// <summary> + /// 椤荤煡閰嶇疆 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + public async Task<int> EditIntroInfo(LifePayIntroInfoInput input) + { + await _lifePayService.EditIntroInfo(input); + return Constant.SUCCESS; + } + + /// <summary> /// 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷 /// </summary> /// <param name="input"></param> diff --git a/LifePayment/LifePayment.rar b/LifePayment/LifePayment.rar new file mode 100644 index 0000000..9fb2a14 --- /dev/null +++ b/LifePayment/LifePayment.rar Binary files differ -- Gitblit v1.9.1