zhengyiming
2025-03-31 6bd99dec62246ddee3472fd810d1ed626a631840
fix: s
6个文件已修改
70 ■■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/User/AccountService.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -1175,6 +1175,21 @@
    public string Name { get; set; }
    public string ChannlesNum { get; set; }
    public Guid ChannlesId { get; set; }
}
public class BackClientUserInfoOutput
{
    /// <summary>
    /// 是否是后台用户
    /// </summary>
    public bool IsBackClientUser { get; set; }
    /// <summary>
    /// 渠道号
    /// </summary>
    public List<ChannelOutput> ChannleList { get; set; }
}
public class LifePayExpensesReceiptsListOutput
LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs
@@ -34,7 +34,7 @@
        Task<Guid> CreateAccount(CreateAccountInput input, bool isSend = false, bool isAdminCreate = false);
        Task<List<ChannelOutput>> GetUserChannel();
        Task<BackClientUserInfoOutput> GetBackClientUserInfo();
        #endregion
    }
}
LifePayment/LifePayment.Application/User/AccountService.cs
@@ -9,6 +9,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
@@ -93,25 +94,23 @@
            return result;
        }
        public async Task<List<ChannelOutput>> GetUserChannel()
        public async Task<BackClientUserInfoOutput> GetBackClientUserInfo()
        {
            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();
            }
            var channlesNums = await _userChannleRep.Where(x => x.UserId == CurrentUser.Id).Select(s => s.ChannleId).Distinct().ToListAsync();
            return userchannel;
            var channleList = await _lifePayChannlesRepository.Where(x => channlesNums.Contains(x.ChannlesNum)).Select(s => new ChannelOutput()
            {
                Name = s.ChannlesName,
                ChannlesId = s.Id,
                ChannlesNum = s.ChannlesNum
            }).ToListAsync();
            BackClientUserInfoOutput result = new BackClientUserInfoOutput()
            {
                IsBackClientUser = CurrentUser.ClientId == Constant.ClientType.Back,
                ChannleList = channleList
            };
            return result;
        }
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -521,9 +521,9 @@
            <param name="id">角色Id</param>
            <returns></returns>
        </member>
        <member name="M:LifePayment.HttpApi.UserRoleController.GetUserChannel">
        <member name="M:LifePayment.HttpApi.UserRoleController.GetBackClientUserInfo">
            <summary>
            获取用户渠道
            获取用户账号详情
            </summary>
            <returns></returns>
        </member>
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -1731,6 +1731,16 @@
            渠道号
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.BackClientUserInfoOutput.IsBackClientUser">
            <summary>
            是否是后台用户
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.BackClientUserInfoOutput.ChannleList">
            <summary>
            渠道号
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.LifePayExpensesReceiptsListOutput.Id">
            <summary>
            编号
LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
@@ -202,13 +202,13 @@
        }
        /// <summary>
        /// 获取用户渠道
        /// 获取用户账号详情
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<ChannelOutput>> GetUserChannel()
        public async Task<BackClientUserInfoOutput> GetBackClientUserInfo()
        {
            return await _accountService.GetUserChannel();
            return await _accountService.GetBackClientUserInfo();
        }
    }
}