From 8c9ad0bd2fc6591fe606c793d6e11e2cfbe5a165 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 28 八月 2024 16:23:42 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java
index 898a5eb..e1d3052 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java
@@ -5,12 +5,12 @@
 import com.ruoyi.account.api.vo.GetAppUserVipDetail;
 import com.ruoyi.account.service.TAppUserVipDetailService;
 import com.ruoyi.common.core.domain.R;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.security.service.TokenService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * @author zhibing.pu
@@ -22,6 +22,8 @@
 	
 	@Resource
 	private TAppUserVipDetailService appUserVipDetailService;
+	@Resource
+	private TokenService tokenService;
 	
 	/**
 	 * 获取用户当前有效的vip明细
@@ -36,6 +38,14 @@
 				.last(" and now() between start_time and end_time"));
 		return R.ok(one);
 	}
-	
+
+	@GetMapping("/getVipUseDetail")
+	@ApiOperation(value = "生效会员列表", tags = {"小程序-个人中心"})
+	public R<List<TAppUserVipDetail>> getVipUseDetail(){
+        Long userId = tokenService.getLoginUserApplet().getUserId();
+        List<TAppUserVipDetail> list = appUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, userId).last(" and now() between start_time and end_time order by start_time desc").list();
+        return R.ok(list);
+	}
+
 	
 }

--
Gitblit v1.7.1