|
|
@ -287,7 +287,7 @@ public class BsOrderServiceImpl implements BsOrderService { |
|
|
|
} else if (3 == discount.getType()) { |
|
|
|
} else if (3 == discount.getType()) { |
|
|
|
deduction.setCouponDiscountActualPrice( |
|
|
|
deduction.setCouponDiscountActualPrice( |
|
|
|
order.getTotalPrice() |
|
|
|
order.getTotalPrice() |
|
|
|
.multiply(discount.getPrice().divide(new BigDecimal("100"))) |
|
|
|
.multiply(discount.getPercentage().divide(new BigDecimal("100"))) |
|
|
|
.setScale(2, BigDecimal.ROUND_DOWN) |
|
|
|
.setScale(2, BigDecimal.ROUND_DOWN) |
|
|
|
); |
|
|
|
); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -298,12 +298,10 @@ public class BsOrderServiceImpl implements BsOrderService { |
|
|
|
.add(new BigDecimal(deduction.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100")))); |
|
|
|
.add(new BigDecimal(deduction.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100")))); |
|
|
|
orderDeductionService.editData(deduction); |
|
|
|
orderDeductionService.editData(deduction); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "积分交易异常"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券使用异常"); |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
redisTemplate.delete(key); |
|
|
|
redisTemplate.delete(key); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return deduction; |
|
|
|
return deduction; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|