gongzuming
2024-09-10 45536ef89d0593be1e96e014f841935240efebea
src/main/java/com/mzl/flower/service/point/PointGoodsService.java
@@ -140,7 +140,7 @@
            }
            CustomerPoint cp = customerPointMapper.selectOne(new LambdaQueryWrapper<CustomerPoint>()
                    .eq(CustomerPoint::getUserId, SecurityUtils.getUserId()));
            if(cp == null || (cp.getTotalPoint()-cp.getUsedPoint()-cp.getExpiredPoint()) < p.getPoint() * dto.getNum()){
            if(cp == null || (cp.getTotalPoint()-cp.getUsedPoint()-cp.getExpiredPoint()-cp.getDeductionPoint()) < p.getPoint() * dto.getNum()){
                throw new ValidationException("积分不足");
            }
            //记录兑换记录