扣除积分问题

This commit is contained in:
2025-12-10 18:00:46 +08:00
parent 2362de5600
commit 4034b1707e

View File

@@ -145,9 +145,6 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
if (goods == null) {
goods = goodsService.getById(record.getPointsGoodsId());
}
//扣除积分
pointsUserService.alterPoints(record.getUserId(), null, record.getShopId(), PointsConstant.SUB,
record.getSpendPoints(), record.getId(), "积分商品兑换");
record.setIsDel(0);
if (goods.getGoodsCategory().equals("优惠券")) {
record.setStatus("已完成");
@@ -167,6 +164,9 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
}
goodsService.upNumberById(goods.getId(), goods.getQuantity() - record.getNumber(), goods.getTotalExchangeCount() + record.getNumber());
goodsRecordService.save(record);
//扣除积分
pointsUserService.alterPoints(record.getUserId(), null, record.getShopId(), PointsConstant.SUB,
record.getSpendPoints(), record.getId(), "积分商品兑换");
return record;
}
}