zhengyiming
2025-06-10 de906e51358b814f614fc1b0b595a298640c6e51
fix: 修改CreateOrUpdatePromoter Output
5个文件已修改
41 ■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/Promoter/IPromoterService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/Promoter/PromoterDto.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/Promoter/PromoterService.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/PromoterController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/Promoter/IPromoterService.cs
@@ -63,7 +63,7 @@
        /// <param name="input"></param>
        /// <returns></returns>
        /// <exception cref="FormatException"></exception>
        Task<Guid> CreateOrUpdatePromoter(CreateOrUpdatePromoterInput input);
        Task<CreateOrUpdatePromoterOutput> CreateOrUpdatePromoter(CreateOrUpdatePromoterInput input);
        /// <summary>
        /// 点击数+1
LifePayment/LifePayment.Application.Contracts/Promoter/PromoterDto.cs
@@ -100,4 +100,17 @@
        /// </summary>
        public string Remark { get; set; }
    }
    public class CreateOrUpdatePromoterOutput
    {
        /// <summary>
        /// Id
        /// </summary>
        public Guid? Id { get; set; }
        /// <summary>
        /// IdNumber
        /// </summary>
        public string IdNumber { get; set; }
    }
}
LifePayment/LifePayment.Application/Promoter/PromoterService.cs
@@ -225,7 +225,7 @@
        /// <param name="input"></param>
        /// <returns></returns>
        /// <exception cref="FormatException"></exception>
        public async Task<Guid> CreateOrUpdatePromoter(CreateOrUpdatePromoterInput input)
        public async Task<CreateOrUpdatePromoterOutput> CreateOrUpdatePromoter(CreateOrUpdatePromoterInput input)
        {
            CheckExtensions.IfTrueThrowUserFriendlyException(string.IsNullOrWhiteSpace(input.Name), "请输入推广人");
            CheckExtensions.IfTrueThrowUserFriendlyException(string.IsNullOrWhiteSpace(input.PhoneNumber), "请输入联系方式");
@@ -248,7 +248,11 @@
                var entity = new LifePayPromoter();
                ObjectMapper.Map(input, entity);
                await lifePayPromoterRepository.InsertAsync(entity);
                return entity.Id;
                return new CreateOrUpdatePromoterOutput
                {
                    Id = entity.Id,
                    IdNumber = entity.IdNumber,
                };
            }
            else
            {
@@ -256,7 +260,11 @@
                CheckExtensions.IfTrueThrowUserFriendlyException(entity == null, "该推广员不存在");
                ObjectMapper.Map(input, entity);
                await lifePayPromoterRepository.UpdateAsync(entity);
                return entity.Id;
                return new CreateOrUpdatePromoterOutput
                {
                    Id = entity.Id,
                    IdNumber = entity.IdNumber,
                };
            }
        }
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -2454,6 +2454,16 @@
            备注
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.CreateOrUpdatePromoterOutput.Id">
            <summary>
            Id
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.CreateOrUpdatePromoterOutput.IdNumber">
            <summary>
            IdNumber
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.RecordOperateHistoryEto.RelationId">
            <summary>
            关联关系ID
LifePayment/LifePayment.HttpApi/LifePay/PromoterController.cs
@@ -103,7 +103,7 @@
        /// <exception cref="FormatException"></exception>
        [HttpPost]
        [AllowAnonymous]
        public async Task<Guid> CreateOrUpdatePromoter(CreateOrUpdatePromoterInput input)
        public async Task<CreateOrUpdatePromoterOutput> CreateOrUpdatePromoter(CreateOrUpdatePromoterInput input)
        {
            return await promoterService.CreateOrUpdatePromoter(input);
        }