zhengyuxuan
2025-03-31 65beca31c74c6313519ba51ac2a3302659172eab
fix:新增渠道查询接口
5个文件已修改
50 ■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/User/AccountService.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
@@ -32,6 +33,8 @@
        Task<IdentityModelTokenCacheItem> GetTokenForWeb(AccessRequestDto accessRequestDto, string webClientIp);
        Task<Guid> CreateAccount(CreateAccountInput input, bool isSend = false, bool isAdminCreate = false);
        Task<List<ChannelOutput>> GetUserChannel();
        #endregion
    }
}
LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs
@@ -128,4 +128,5 @@
        /// </summary>
        public Guid? DepartmentOrgId { get; set; }
    }
}
LifePayment/LifePayment.Application/User/AccountService.cs
@@ -92,10 +92,27 @@
            return result;
        }
        //public async Task<UserChannelOutput> GetUserChannel()
        //{
        //    var userchannel = await _userChannleRep.Where
        //}
        public async Task<List<ChannelOutput>> GetUserChannel()
        {
            var userchannel = await _userChannleRep.Where(x => x.UserId == CurrentUser.Id)
                .Select(s => new ChannelOutput()
                {
                    Name = _lifePayChannlesRepository.Where(x => x.ChannlesNum == s.ChannleId).Select(r => r.ChannlesName).FirstOrDefault(),
                    ChannlesNum = s.ChannleId
                }).ToListAsync();
            if (userchannel.Count() == 0)
            {
                userchannel = await _lifePayChannlesRepository
               .Select(s => new ChannelOutput()
               {
                   Name = s.ChannlesName,
                   ChannlesNum = s.ChannlesNum
               }).ToListAsync();
            }
            return userchannel;
        }
        #endregion
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -521,6 +521,12 @@
            <param name="id">角色Id</param>
            <returns></returns>
        </member>
        <member name="M:LifePayment.HttpApi.UserRoleController.GetUserChannel">
            <summary>
            获取用户渠道
            </summary>
            <returns></returns>
        </member>
        <member name="M:LifePayment.HttpApi.WxPayNotifyController.WxRechargeNotify(LifePayment.Application.Contracts.WxRechargeNotifyInput)">
            <summary>
            微信支付回调通知
LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
@@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Identity;
@@ -200,10 +201,14 @@
            return await _userRoleService.DeleteRole(id);
        }
        //[HttpGet]
        //public async Task<UserChannelOutput> GetUserChannel()
        //{
        //    return await _accountService.GetUserChannel();
        //}
        /// <summary>
        /// 获取用户渠道
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<ChannelOutput>> GetUserChannel()
        {
            return await _accountService.GetUserChannel();
        }
    }
}