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