From 5b1e0cd79b93ffb4c784ad15886066623845f9e3 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期二, 10 六月 2025 11:14:08 +0800
Subject: [PATCH] Merge branch 'dev-1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-1.3

---
 LifePayment/LifePayment.Application/Promoter/PromoterService.cs |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/LifePayment/LifePayment.Application/Promoter/PromoterService.cs b/LifePayment/LifePayment.Application/Promoter/PromoterService.cs
index dd064a0..e1e2296 100644
--- a/LifePayment/LifePayment.Application/Promoter/PromoterService.cs
+++ b/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,
+                };
             }
         }
 

--
Gitblit v1.9.1