From c0adb88e32f408e5588f689d702837513cd5422d Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期四, 19 九月 2024 16:45:33 +0800
Subject: [PATCH] 1.商品限购不控制数量
---
src/main/java/com/mzl/flower/service/point/PointGoodsService.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/mzl/flower/service/point/PointGoodsService.java b/src/main/java/com/mzl/flower/service/point/PointGoodsService.java
index 28efa42..69c144b 100644
--- a/src/main/java/com/mzl/flower/service/point/PointGoodsService.java
+++ b/src/main/java/com/mzl/flower/service/point/PointGoodsService.java
@@ -220,6 +220,7 @@
record.setOrderId(orderId);
pointGoodsRecordMapper.updateById(record);
}
+
public void revertExchangeGoods(Long recordId) {
PointGoodsRecord record = pointGoodsRecordMapper.selectById(recordId);
if(record == null){
@@ -228,7 +229,7 @@
if(!Constants.POINT_GOODS_RECORD_STATUS.U.name().equals(record.getStatus())){
throw new ValidationException("兑换券未使用或过期");
}
- if(!SecurityUtils.getUserId().equals(record.getUserId())){
+ if(SecurityUtils.getUserId() != null && !SecurityUtils.getUserId().equals(record.getUserId())){
throw new ValidationException("兑换券不属于当前用户");
}
record.setStatus(Constants.POINT_GOODS_RECORD_STATUS.A.name());
--
Gitblit v1.9.3