From 71656127d2d3fa023eb767343a9ac01172f2802d Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 27 八月 2025 21:31:40 +0800
Subject: [PATCH] bug修改

---
 cloud-server-account/src/main/java/com/dsh/account/service/impl/VipPaymentServiceImpl.java |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/VipPaymentServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/VipPaymentServiceImpl.java
index 55b5a3d..73654b5 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/VipPaymentServiceImpl.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/VipPaymentServiceImpl.java
@@ -129,7 +129,7 @@
         String code = vipPayment.getCode();
         String amount = vipPayment.getAmount().toString();
         ResultUtil alipay = payMoneyUtil.alipay
-                (smid, "购买年度会员", "购买年度会员",
+                (smid, "购买会员", "购买会员",
                         vipPayment.getAppUserId() + "",
                         code, vipPayment.getAmount().toString(),
                         "/base/appUser/addVipPaymentAliCallback");
@@ -250,16 +250,16 @@
         switch (vip.getTimeType()) {
             case 1:
                 // 天
-                localDateTime.plusDays(time);
+                localDateTime = localDateTime.plusDays(time);
                 break;
             case 2:
                 // 月
-                localDateTime.plusMonths(time);
+                localDateTime =  localDateTime.plusMonths(time);
 
                 break;
             case 3:
                 // 年
-                localDateTime.plusYears(time);
+                localDateTime =  localDateTime.plusYears(time);
                 break;
         }
         appUser.setIsVip(1);
@@ -272,15 +272,16 @@
 
         if (StringUtils.hasLength(couponJson)) {
             grantCoupon.setCouponJson(couponJson);
-            grantCoupon.setUserId(vipPayment1.getAppUserId());
-            grantCoupon.setVipPaymentId(vipPayment1.getId());
         }
+        grantCoupon.setVipId(vipPayment1.getVipId());
+        grantCoupon.setUserId(vipPayment1.getAppUserId());
+        grantCoupon.setVipPaymentId(vipPayment1.getId());
         String ticketJson = vipPayment1.getTicketJson();
         if (StringUtils.hasLength(ticketJson)) {
             grantCoupon.setTicketJson(ticketJson);
         }
         // 远程调用 给用户送优惠券和门票
-        userConponClient.granCoupon(grantCoupon);
+        userConponClient.grantCoupon(grantCoupon);
 
         // 注册会员送券 先判断是否有注册送券类型的优惠券 判断优惠券状态 审核是否通过 是否删除 是否在有效期内 是否领取数量达上限
         List<Long> longs = userConponClient.queryCouponByUser(appUser.getId());

--
Gitblit v1.7.1