sunpengfei
2025-06-10 5b1e0cd79b93ffb4c784ad15886066623845f9e3
LifePayment/LifePayment.Application/Promoter/PromoterService.cs
@@ -172,6 +172,7 @@
            var query = from cc in lifePayChannelConsultationRepository
                        join p in lifePayPromoterRepository on cc.PromoterId equals p.Id into pg
                        from pgd in pg.DefaultIfEmpty()
                        where cc.Id == id
                        select new ChannelConsultationDto
                        {
                            Id = cc.Id,
@@ -224,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), "请输入联系方式");
@@ -247,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
            {
@@ -255,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,
                };
            }
        }