积分模块相关代码

This commit is contained in:
谭凯凯
2024-11-01 17:45:13 +08:00
committed by Tankaikai
parent b81cef6782
commit 4c14f6a908

View File

@@ -217,14 +217,8 @@ public class TbPointsExchangeRecordServiceImpl extends ServiceImpl<TbPointsExcha
if (entity == null) { if (entity == null) {
throw new MsgException("订单不存在"); throw new MsgException("订单不存在");
} }
TbPointsBasicSetting basic = null;
TbPointsGoodsSetting goods = null;
TbMemberPoints memberPoints = null;
try { try {
Object[] verify = verify(entity); verify(entity);
basic = (TbPointsBasicSetting) verify[0];
goods = (TbPointsGoodsSetting) verify[1];
memberPoints = (TbMemberPoints) verify[2];
} catch (Exception e) { } catch (Exception e) {
throw new MsgException(e.getMessage().concat(",请您取消订单")); throw new MsgException(e.getMessage().concat(",请您取消订单"));
} }
@@ -248,11 +242,12 @@ public class TbPointsExchangeRecordServiceImpl extends ServiceImpl<TbPointsExcha
throw new MsgException("此商品不需要额外支付金额"); throw new MsgException("此商品不需要额外支付金额");
} }
// 如果不需要额外支付 // 如果不需要额外支付
if (NumberUtil.equals(record.getExtraPaymentAmount(), BigDecimal.ZERO)) { if (NumberUtil.equals(entity.getExtraPaymentAmount(), BigDecimal.ZERO)) {
// 设置核销券码 // 设置核销券码
entity.setCouponCode(IdUtil.getSnowflakeNextIdStr()); entity.setCouponCode(IdUtil.getSnowflakeNextIdStr());
entity.setStatus("waiting"); entity.setStatus("waiting");
entity.setPayTime(new Date()); entity.setPayTime(new Date());
entity.setPayType(record.getPayType().toUpperCase());
super.updateById(entity); super.updateById(entity);
waitingAfter(entity); waitingAfter(entity);
return entity; return entity;