From 7e73e670d70e860bce6c216c23a75d366982c3c2 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 08 十月 2024 17:26:03 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
index 1eb1e82..ada569e 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
@@ -219,7 +219,7 @@
             if (coupon.getInventoryQuantity() != -1 && count >= coupon.getInventoryQuantity()) {
                 return AjaxResult.error("当前用户已到达兑换"+coupon+"次");
             }else {
-                coupon.setInventoryQuantity(coupon.getInventoryQuantity()-exchangeDto.getNum());
+                coupon.setInventoryQuantity(coupon.getInventoryQuantity()-1);
             }
 
 

--
Gitblit v1.7.1