From abd914abdee5831b04b6d76d04bd1a50534fa68c Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期二, 06 五月 2025 16:51:18 +0800
Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile into dev
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java | 24 ++++++++++++++++++++----
1 files changed, 20 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 700ba9e..bcd53a4 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
@@ -121,6 +121,10 @@
public R<TVip> getInfo1(@RequestParam("id")Integer id) {
return R.ok(vipService.getById(id));
}
+ @PostMapping("/getAllVip")
+ R<List<TVip>> getAllVip() {
+ return R.ok(vipService.list());
+ }
@@ -340,17 +344,29 @@
@ApiOperation(value = "购买会员", tags = {"小程序-个人中心"})
@GetMapping("/vipInfo/pay")
public Object vipInfoPay(@RequestParam("vipId")Integer vipId,@RequestParam("buyType") Integer buyType,
- @RequestParam("payType") Integer payType
- ) {
-
+ @RequestParam("payType") Integer payType) {
+
+ LocalDateTime now = LocalDateTime.now();
TVip byId = vipService.getById(vipId);
if (byId==null){
return R.ok("当前会员不存在,请刷新后重试。");
}
+ if(byId.getReveal() == 0){
+ return R.ok("无效的会员");
+ }
+ if(1 == buyType && byId.getMonthlyCardReveal() == 0){
+ return R.ok("无效的会员");
+ }
+ if(2 == buyType && byId.getSeasonCardReveal() == 0){
+ return R.ok("无效的会员");
+ }
+ if(3 == buyType && byId.getAnnualCardReveal() == 0){
+ return R.ok("无效的会员");
+ }
+
BigDecimal payMoney = BigDecimal.ZERO;
BigDecimal discountMoney = BigDecimal.ZERO;
BigDecimal discount = BigDecimal.ZERO;
- LocalDateTime now = LocalDateTime.now();
switch (buyType){
case 1:
if (byId.getMonthlyCardDiscountStart()!=null&&(now.isAfter(byId.getMonthlyCardDiscountStart())&&now.isBefore(byId.getMonthlyCardDiscountEnd()))){
--
Gitblit v1.7.1