From 0c08105fb3dcab52b444aae3c02962bf37d3183a Mon Sep 17 00:00:00 2001 From: wanyongkang <937888580@qq.com> Date: Fri, 16 Oct 2020 17:13:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Controllers/UserController.cs | 7 ++++++- Services/Hncore.Pass.Sells/Service/Coupon/CouponService.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Host/Controllers/UserController.cs b/Host/Controllers/UserController.cs index 7306df2..b32c98a 100644 --- a/Host/Controllers/UserController.cs +++ b/Host/Controllers/UserController.cs @@ -600,6 +600,11 @@ namespace Home.Controllers if (ret.Code != ResultCode.C_SUCCESS) return false; } else { phone = userEntity.Phone; + + if(userEntity.TaoBao == null){ + userEntity.TaoBao= notifyOrder.BuyerNick; + await m_UserService.Update(userEntity); + } } var amountInfo = new UpdateAmountRequest() @@ -611,7 +616,7 @@ namespace Home.Controllers AttchInfo = notifyOrder.Tid }; var retAmount = await m_UserService.UpdateAmount(amountInfo); - await m_CouponService.TaoBaoGive(userEntity.Id, 9, userEntity.TaoBao); + await m_CouponService.TaoBaoGive(userEntity.Id, 9, notifyOrder.BuyerNick); var taobaoEntity = notifyOrder.MapTo(); diff --git a/Services/Hncore.Pass.Sells/Service/Coupon/CouponService.cs b/Services/Hncore.Pass.Sells/Service/Coupon/CouponService.cs index f60f3ac..1ca30a1 100644 --- a/Services/Hncore.Pass.Sells/Service/Coupon/CouponService.cs +++ b/Services/Hncore.Pass.Sells/Service/Coupon/CouponService.cs @@ -24,7 +24,7 @@ namespace Hncore.Pass.Sells.Service this.m_CouponUserOrginService = m_CouponUserOrginService; } - public async Task Give(int couponId, string fromUser, int toUser, int count, CouponOriginType originType= CouponOriginType.Admin, string remark = "系统赠送", string toUserRef="") + public async Task Give(int couponId, string fromUser, int toUser, int count, CouponOriginType originType= CouponOriginType.Admin, string remark = "系统赠送", string toUserRef="暂无") { var orginCoupon = new CouponUserOrginEntity() {