Authored by LUOXC

refactor

@@ -47,7 +47,8 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi @@ -47,7 +47,8 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
47 @Value("${deposit.prestore}") 47 @Value("${deposit.prestore}")
48 private Double depositPreStore; 48 private Double depositPreStore;
49 49
50 - private BigDecimal depositEarnestMoneyLimit; 50 + @Value("${deposit.earnest.money.limit:5000}")
  51 + private int depositEarnestMoneyLimit;
51 52
52 @Autowired 53 @Autowired
53 UfoServiceCaller ufoServiceCaller; 54 UfoServiceCaller ufoServiceCaller;
@@ -87,11 +88,6 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi @@ -87,11 +88,6 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
87 @Autowired 88 @Autowired
88 SellerWalletMapper sellerWalletMapper; 89 SellerWalletMapper sellerWalletMapper;
89 90
90 - @Value("${deposit.earnest.money.limit:5000}")  
91 - private void depositEarnestMoneyLimit(double depositEarnestMoneyLimit){  
92 - this.depositEarnestMoneyLimit = BigDecimal.valueOf(depositEarnestMoneyLimit);  
93 - }  
94 -  
95 /** 91 /**
96 * 充值保证金 92 * 充值保证金
97 */ 93 */
@@ -122,7 +118,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi @@ -122,7 +118,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
122 } 118 }
123 BigDecimal totalEarnestMoney = sw.getAmount(); 119 BigDecimal totalEarnestMoney = sw.getAmount();
124 120
125 - if (totalEarnestMoney.add(amount).compareTo(depositEarnestMoneyLimit) > 0) { 121 + if (totalEarnestMoney.add(amount).compareTo(BigDecimal.valueOf(depositEarnestMoneyLimit)) > 0) {
126 throw new UfoServiceException(400, "账户余额不能超过" + depositEarnestMoneyLimit); 122 throw new UfoServiceException(400, "账户余额不能超过" + depositEarnestMoneyLimit);
127 } 123 }
128 124