From fc21ab0f288823a22a05b13d33f07362b5c6b91c Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 13 一月 2025 13:13:11 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java index 0bad0c1..b5638e1 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java @@ -1141,8 +1141,7 @@ //处理优惠券 if(null != order.getUserCouponId()){ UserCoupon userCoupon = userCouponClient.getUserCoupon(order.getUserCouponId()).getData(); - if(null != userCoupon && 1 == userCoupon.getStatus()){ - userCoupon.setStatus(2); + if(null != userCoupon && null == userCoupon.getUseTime()){ userCoupon.setUseTime(LocalDateTime.now()); userCouponClient.editUserCoupon(userCoupon); } @@ -1354,7 +1353,7 @@ //处理优惠券 if(null != order.getUserCouponId()){ UserCoupon userCoupon = userCouponClient.getUserCoupon(order.getUserCouponId()).getData(); - if(null != userCoupon && 1 == userCoupon.getStatus()){ + if(null != userCoupon && null == userCoupon.getUseTime()){ userCoupon.setStatus(2); userCoupon.setUseTime(LocalDateTime.now()); userCouponClient.editUserCoupon(userCoupon); -- Gitblit v1.7.1