Authored by LUOXC

refactor

... ... @@ -47,7 +47,8 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
@Value("${deposit.prestore}")
private Double depositPreStore;
private BigDecimal depositEarnestMoneyLimit;
@Value("${deposit.earnest.money.limit:5000}")
private int depositEarnestMoneyLimit;
@Autowired
UfoServiceCaller ufoServiceCaller;
... ... @@ -87,11 +88,6 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
@Autowired
SellerWalletMapper sellerWalletMapper;
@Value("${deposit.earnest.money.limit:5000}")
private void depositEarnestMoneyLimit(double depositEarnestMoneyLimit){
this.depositEarnestMoneyLimit = BigDecimal.valueOf(depositEarnestMoneyLimit);
}
/**
* 充值保证金
*/
... ... @@ -122,7 +118,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
}
BigDecimal totalEarnestMoney = sw.getAmount();
if (totalEarnestMoney.add(amount).compareTo(depositEarnestMoneyLimit) > 0) {
if (totalEarnestMoney.add(amount).compareTo(BigDecimal.valueOf(depositEarnestMoneyLimit)) > 0) {
throw new UfoServiceException(400, "账户余额不能超过" + depositEarnestMoneyLimit);
}
... ...