|
|
@@ -104,13 +104,14 @@ public class PointExchangeServiceImpl implements PointExchangeService {
|
|
|
|
|
|
//添加积分消费
|
|
|
PointRecord pointRecord = new PointRecord();
|
|
|
- BigDecimal negate = goods.getPoint().negate();
|
|
|
- System.out.println(negate);
|
|
|
pointRecord.setPoint(goods.getPoint().negate());
|
|
|
pointRecord.setUserId(user.getId());
|
|
|
pointRecord.setPointGoodsId(goodsId);
|
|
|
pointRecord.setPointType(PointTypeEnum.PUFA_POINT_EXCHANGE);
|
|
|
- Assert.isTrue(pointRecordService.save(pointRecord),"兑换失败");
|
|
|
+ pointRecord.setPhone(phone);
|
|
|
+ pointRecord.setActiveId(activeId);
|
|
|
+ boolean save = pointRecordService.save(pointRecord);
|
|
|
+ System.out.println(save);
|
|
|
|
|
|
//更新商品库存
|
|
|
goods.setRemain(goods.getRemain() - num);
|