lingling
2025-03-19 567911f4b389e0c6e548855ec10ff827a3095f33
Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentApi
15个文件已修改
115 ■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayService.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/User/UserRoleService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain/Ali/AlipayApiConstant.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain/Common/UserChannle.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
@@ -171,7 +171,7 @@
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<PageOutput<UserListOutput>> GetUserPage(PageInput input);
    Task<PageOutput<UserListOutput>> GetUserPage(QueryUserPageInput input);
    /// <summary>
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
@@ -391,4 +391,28 @@
    /// </summary>
    [StringLength(30, ErrorMessage = "备注信息仅支持填写30个字符。")]
    public string Remark { get; set; } = string.Empty;
}
public class QueryUserPageInput : ChannelsBaseInput
{
    /// <summary>
    /// 手机号/用户名
    /// </summary>
    public string? QueryCondition { get; set; }
    /// <summary>
    /// 注册时间
    /// </summary>
    public DateTime? CreationTime { get; set; }
}
public class Model_UserAccountExtraProperties
{
    public string? Name { get; set; }
    public string IspCode { get; set; }
    public string Phone { get; set; }
    public string Remark { get; set; }
}
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -125,6 +125,11 @@
    public string PhoneNumber { get; set; }
    /// <summary>
    /// 姓名
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 最后登录渠道
    /// </summary>
    public string? CreationChannle { get; set; }
LifePayment/LifePayment.Application.Contracts/User/CreateBackClientUserInput.cs
@@ -31,7 +31,7 @@
        /// <summary>
        /// 渠道列表
        /// </summary>
        public Guid[] ChannlesId { get; set; }
        public string[] ChannlesId { get; set; }
        /// <summary>
        /// 组织架构公司id
@@ -231,7 +231,7 @@
        /// <summary>
        /// 渠道Id
        /// </summary>
        public Guid Id { get; set; }
        public string Id { get; set; }
        /// <summary>
        /// 渠道名
LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs
@@ -77,7 +77,7 @@
        /// <summary>
        /// 渠道列表
        /// </summary>
        public Guid[] ChannlesId { get; set; }
        public string[] ChannlesId { get; set; }
        /// <summary>
        /// 小程序OpenId
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -29,6 +29,8 @@
using Z.EntityFramework.Plus;
using LifePayment.Domain.LifePay;
using pingan.openbank.api.sdk.enums;
using System.Linq.Dynamic.Core;
using static Volo.Abp.Identity.Settings.IdentitySettingNames;
namespace LifePayment.Application;
@@ -171,15 +173,19 @@
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public async Task<PageOutput<UserListOutput>> GetUserPage(PageInput input)
    public async Task<PageOutput<UserListOutput>> GetUserPage(QueryUserPageInput input)
    {
        return await _lifePayUserRepository.Select(x =>
        return await _lifePayUserRepository.Where(x => x.IsDeleted == false)
            .WhereIf(!string.IsNullOrEmpty(input.QueryCondition), x => x.PhoneNumber.Contains(input.QueryCondition) || x.Name.Contains(input.QueryCondition))
            .WhereIf(input.CreationTime.HasValue, x => x.CreationTime.ToString("yyyy-MM-dd") == input.CreationTime.Value.ToString("yyyy-MM-dd"))
                                            .Select(x =>
                                                   new UserListOutput()
                                                   {
                                                       Id = x.Id,
                                                       CreationChannle = string.IsNullOrEmpty(x.CreationChannleNum) ? "" : _lifePayChannlesRep.Where(c => c.ChannlesNum == x.CreationChannleNum).FirstOrDefault().ChannlesName,
                                                       LastLoginChannle = string.IsNullOrEmpty(x.LastLoginChannleNum) ? "" : _lifePayChannlesRep.Where(c => c.ChannlesNum == x.LastLoginChannleNum).FirstOrDefault().ChannlesName,
                                                       PhoneNumber = x.PhoneNumber,
                                                       Name = string.IsNullOrEmpty(x.Name) ? "" : x.Name,
                                                       CreationTime = x.CreationTime,
                                                       LastLoginTime = x.LastLoginTime
                                                   })
@@ -1074,6 +1080,15 @@
        await _lifePayOrderRepository.UpdateAsync(order);
    }
    /// <summary>
    /// 微信退款
    /// </summary>
    /// <param name="outTradeNo"></param>
    /// <param name="reason"></param>
    /// <param name="refund"></param>
    /// <param name="total"></param>
    /// <param name="currency"></param>
    /// <returns></returns>
    public async Task<WxPayDomesticRefundsReponse> WxPayDomesticRefunds(string outTradeNo, string reason, int refund, int total, string currency = "CNY")
    {
        WxPayDomesticRefundsRequest req = new WxPayDomesticRefundsRequest
@@ -1094,8 +1109,13 @@
        return res;
    }
    public async Task<int> AddUpdateUserAccount(AddUpdateUserAccountInput input)
    {
        var user = await _lifePayUserRepository.Where(r => r.Id == input.UserId && !r.IsDeleted).FirstOrDefaultAsync();
        CheckExtensions.IfTrueThrowUserFriendlyException(user == null, "用户不存在");
        if (input.Id.HasValue)
        {
            var userAccount = await _lifePayAccount.Where(x => x.UserId == input.UserId && x.Id == input.Id)
@@ -1133,6 +1153,16 @@
            await _lifePayAccount.InsertAsync(userAccount);
        }
        if (input.LifePayType == LifePayOrderTypeEnum.话费订单)
        {
            var extraProperties = JsonConvert.DeserializeObject<Model_UserAccountExtraProperties>(input.ExtraProperties);
            if (!string.IsNullOrEmpty(extraProperties.Name))
            {
                user.Name = extraProperties.Name;
            }
        }
        return Constant.SUCCESS;
    }
LifePayment/LifePayment.Application/User/UserRoleService.cs
@@ -53,10 +53,10 @@
                            Name = r.Name,
                        },
                Channles = from uc in u.UserChannle
                           from c in _channleRepository.Where(s => s.Id == uc.ChannleId)
                           from c in _channleRepository.Where(s => s.ChannlesNum == uc.ChannleId)
                        select new UserChannleDto
                        {
                            Id = c.Id,
                            Id = c.ChannlesNum,
                            Name = c.ChannlesName,
                        },
                Remark = u.Remark,
LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs
@@ -120,5 +120,11 @@
    图片 = 1,
    [Description("视频")]
    视频 = 2
    视频 = 2,
    [Description("富文本")]
    富文本 = 3,
    [Description("微信的内容")]
    微信的内容 = 4,
}
LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs
@@ -772,4 +772,6 @@
        public int RefundFee { get; set; }
    }
}
LifePayment/LifePayment.Domain/Ali/AlipayApiConstant.cs
@@ -17,7 +17,7 @@
        internal const string FundTransCommonQuery = "alipay.fund.trans.common.query";
        internal const string FundTransOrderChanged = "alipay.fund.trans.order.changed";
        internal const string FundTransPagePay = "alipay.fund.trans.page.pay";
        internal const string TradeRefund = "alipay.trade.refund";
        //internal const string FundBatchUniTransfer = "alipay.fund.batch.uni.transfer";
        //internal const string FundBatchDetailQuery = "alipay.fund.batch.detail.query";
LifePayment/LifePayment.Domain/Common/UserChannle.cs
@@ -13,7 +13,7 @@
        /// <summary>
        /// 渠道Id
        /// </summary>
        public  Guid ChannleId { get; set; }
        public virtual string ChannleId { get; set; }
        public virtual User User { get; set; }
    }
}
LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs
@@ -16,6 +16,11 @@
        public string PhoneNumber { get; set; }
        /// <summary>
        /// 充值手机号对应的户主姓名
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 小程序OpenId
        /// </summary>
        public string OpenId { get; set; }
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -110,7 +110,7 @@
            </summary>
            <returns></returns>
        </member>
        <member name="M:LifePayment.HttpApi.LifePayController.GetUserPage(ZeroD.Util.PageInput)">
        <member name="M:LifePayment.HttpApi.LifePayController.GetUserPage(LifePayment.Application.Contracts.QueryUserPageInput)">
            <summary>
            获取用户分页数据
            </summary>
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -154,7 +154,7 @@
            <param name="orderNo"></param>
            <returns></returns>
        </member>
        <member name="M:LifePayment.Application.Contracts.ILifePayService.GetUserPage(ZeroD.Util.PageInput)">
        <member name="M:LifePayment.Application.Contracts.ILifePayService.GetUserPage(LifePayment.Application.Contracts.QueryUserPageInput)">
            <summary>
            获取用户分页数据
            </summary>
@@ -496,6 +496,16 @@
            备注
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.QueryUserPageInput.QueryCondition">
            <summary>
            手机号/用户名
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.QueryUserPageInput.CreationTime">
            <summary>
            注册时间
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.LifePayIntroInfoInput.LifePayType">
            <summary>
            生活缴费类型
@@ -566,6 +576,11 @@
            用户手机号
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.UserListOutput.Name">
            <summary>
            姓名
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.UserListOutput.CreationChannle">
            <summary>
            最后登录渠道
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -164,7 +164,7 @@
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<PageOutput<UserListOutput>> GetUserPage(PageInput input)
        public async Task<PageOutput<UserListOutput>> GetUserPage(QueryUserPageInput input)
        {
            return await _lifePayService.GetUserPage(input);
        }