## 支付大于1元才随机减;随机减金额最大为0.3元;
This commit is contained in:
		
							parent
							
								
									4cfd678d06
								
							
						
					
					
						commit
						f1238c4f96
					
				|  | @ -28,7 +28,7 @@ public class PayUtil { | ||||||
|      * @return |      * @return | ||||||
|      */ |      */ | ||||||
|     public static BigDecimal handleAmountRandom(BigDecimal amount) { |     public static BigDecimal handleAmountRandom(BigDecimal amount) { | ||||||
|         if (amount.compareTo(RANDOM_LIMIT) > 0) { |         if (amount.compareTo(RANDOM_LIMIT) >= 0) { | ||||||
|             // 订单金额大于1元才进行处理 |             // 订单金额大于1元才进行处理 | ||||||
|             return amount.subtract(RANDOM).add(RandomUtil.randomBigDecimal(new BigDecimal("0.01"), RANDOM).setScale(2, BigDecimal.ROUND_HALF_UP)); |             return amount.subtract(RANDOM).add(RandomUtil.randomBigDecimal(new BigDecimal("0.01"), RANDOM).setScale(2, BigDecimal.ROUND_HALF_UP)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue