| | |
| | | integralBack = payAmount.divide(platformConfigDTO.getReturnShopIntegral(),2,BigDecimal.ROUND_DOWN); |
| | | } |
| | | } |
| | | return integralBack; |
| | | //积分获取向下取整 |
| | | return integralBack.setScale(0, BigDecimal.ROUND_DOWN); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | //剩余积分值 |
| | | orderPayConfirmResponse.setSurplusIntegral(totalIntegral); |
| | | //实际抵扣使用积分 |
| | | orderPayConfirmResponse.setDeductIntegral(totalIntegral.compareTo(maxDeductionIntegral)<=Constants.ZERO?totalIntegral:maxDeductionIntegral); |
| | | //实际抵扣使用积分(向上取整) |
| | | BigDecimal deductIntegralValue = totalIntegral.compareTo(maxDeductionIntegral)<=Constants.ZERO?totalIntegral:maxDeductionIntegral; |
| | | orderPayConfirmResponse.setDeductIntegral(deductIntegralValue.setScale(0, BigDecimal.ROUND_UP)); |
| | | return realDeductionCash; |
| | | |
| | | } |
| | |
| | | } |
| | | //加入redis缓存,刷新今天售后编号0开始 |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.WITHDRAW_KEY,countWithdraw); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |