From 49fb5dff4e64c84572f9fad27ebd2969705d3eaf Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期一, 10 三月 2025 11:23:06 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java | 20 ++++++++++++++++---- 1 files changed, 16 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 27ccbfa..e6d49d2 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 @@ -344,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.getMonthlyCardDiscountReveal() == 0){ + return R.ok("无效的会员"); + } + if(2 == buyType && byId.getSeasonCardDiscountReveal() == 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