Authored by Lixiaodi

小数强制两位

@@ -569,7 +569,11 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -569,7 +569,11 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
569 } 569 }
570 570
571 private SellerWallet changeEarnest(Integer uid, BigDecimal money, long orderCode, MerchantOrderAttachInfo attach, SellerWalletDetail.Type type) { 571 private SellerWallet changeEarnest(Integer uid, BigDecimal money, long orderCode, MerchantOrderAttachInfo attach, SellerWalletDetail.Type type) {
572 - 572 + BigDecimal money2 = money.setScale(2, BigDecimal.ROUND_HALF_UP);
  573 + if (money2.compareTo(money) != 0) {
  574 + logger.warn("{}修改钱包表入口,uid={},金额超出两位小数(自动截取) money={}, money2={}", type.getName(), uid, money, money2);
  575 + money = money2;
  576 + }
573 logger.info("{}修改钱包表入口,uid={},money={}", type.getName(), uid, money); 577 logger.info("{}修改钱包表入口,uid={},money={}", type.getName(), uid, money);
574 String message = type.getName(); 578 String message = type.getName();
575 // 使用钱包余额,支付保证金 579 // 使用钱包余额,支付保证金