From 73be7ff2317fea8194b7a6dc0452b64a511c7836 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 06 十一月 2024 18:42:38 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java
index 53be1bb..48e5837 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java
@@ -93,6 +93,11 @@
         return R.ok(vipService.getById(id));
     }
 
+    @GetMapping(value = "/getVipList")
+    public R<List<TVip>> getVipList(){
+        return  R.ok(vipService.lambdaQuery().eq(TVip::getReveal, 1).list());
+    }
+
     /**
      * 远程调用
      * @param id
@@ -243,7 +248,8 @@
            GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail();
            getAppUserVipDetail.setAppUserId(userId);
            getAppUserVipDetail.setVipId(data.getVipId());
-           TAppUserVipDetail data1 = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail).getData();
+           R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail);
+           TAppUserVipDetail data1 = appUserVipDetail.getData();
            String vipJson = data1.getVipJson();
            TVip tVip = JSON.parseObject(vipJson, TVip.class);
            vips.add(tVip);
@@ -301,8 +307,10 @@
                vipInfoDto.setTotalDiscount(total);
 
                vipInfoDto.setTimeAmount(vip.getMaximumDeduction().multiply(BigDecimal.valueOf(vip.getDiscountTimes())));
-               vipInfoDtos.add(vipInfoDto);
                }
+               vipInfoDto.setType(vip.getType());
+               vipInfoDtos.add(vipInfoDto);
+
            }
            return R.ok(vipInfoDtos);
 
@@ -314,7 +322,7 @@
 
     @ApiOperation(value = "购买会员", tags = {"小程序-个人中心"})
     @GetMapping("/vipInfo/pay")
-    public R vipInfoPay(@RequestParam("vipId")Integer vipId,@RequestParam("buyType") Integer buyType,
+    public Object vipInfoPay(@RequestParam("vipId")Integer vipId,@RequestParam("buyType") Integer buyType,
         @RequestParam("payType") Integer payType
     ) {
 
@@ -358,7 +366,7 @@
 
         Long userId = tokenService.getLoginUserApplet().getUserId();
 
-        return R.ok(vipService.vipInfoPay(byId,payMoney,payType,discountMoney,discount,buyType,userId));
+        return vipService.vipInfoPay(byId,payMoney,payType,discountMoney,discount,buyType,userId);
     }
 }
 

--
Gitblit v1.7.1