|
@@ -594,7 +594,7 @@ public class UserPositionServiceImpl implements IUserPositionService {
|
|
BigDecimal buy_amt_autual = buyOrderPrice.multiply(new BigDecimal(buyNum));
|
|
BigDecimal buy_amt_autual = buyOrderPrice.multiply(new BigDecimal(buyNum));
|
|
log.info("用户可用金额 = {} 实际购买金额 = {}", user_enable_amt, buy_amt_autual);
|
|
log.info("用户可用金额 = {} 实际购买金额 = {}", user_enable_amt, buy_amt_autual);
|
|
// 手续费
|
|
// 手续费
|
|
- BigDecimal position_freez = new BigDecimal(buyNum).multiply(stock.getTransFee());
|
|
|
|
|
|
+ BigDecimal position_freez = buyOrderPrice.multiply(new BigDecimal(buyNum)).multiply(stock.getTransFee()).multiply(new BigDecimal(stock.getContractSize()));
|
|
//冻结保证金
|
|
//冻结保证金
|
|
BigDecimal depositFreezeAmt = buyOrderPrice.multiply(new BigDecimal(stock.getContractSize())).multiply(new BigDecimal(buyNum)).divide(new BigDecimal(stock.getSiteLever()), 2, 4);
|
|
BigDecimal depositFreezeAmt = buyOrderPrice.multiply(new BigDecimal(stock.getContractSize())).multiply(new BigDecimal(buyNum)).divide(new BigDecimal(stock.getSiteLever()), 2, 4);
|
|
log.info("冻结保证金 = " + depositFreezeAmt);
|
|
log.info("冻结保证金 = " + depositFreezeAmt);
|
|
@@ -722,7 +722,7 @@ public class UserPositionServiceImpl implements IUserPositionService {
|
|
BigDecimal user_amt = user.getUserAmt();
|
|
BigDecimal user_amt = user.getUserAmt();
|
|
// 判断金额是否能够买得起 用 可用金额 > 冻结金额 + 手续费 则标示可以购买
|
|
// 判断金额是否能够买得起 用 可用金额 > 冻结金额 + 手续费 则标示可以购买
|
|
// 手续费
|
|
// 手续费
|
|
- BigDecimal position_freez = new BigDecimal(buyNum).multiply(stock.getTransFee());
|
|
|
|
|
|
+ BigDecimal position_freez = nowPrice.multiply(new BigDecimal(buyNum)).multiply(stock.getTransFee()).multiply(new BigDecimal(stock.getContractSize()));
|
|
log.info("手续费 = " + position_freez);
|
|
log.info("手续费 = " + position_freez);
|
|
//冻结保证金 = 现价* 合约单位 * 手数 / 杠杆
|
|
//冻结保证金 = 现价* 合约单位 * 手数 / 杠杆
|
|
BigDecimal depositFreezeAmt = nowPrice.multiply(new BigDecimal(stock.getContractSize())).multiply(new BigDecimal(buyNum)).divide(new BigDecimal(stock.getSiteLever()), 2, 4);
|
|
BigDecimal depositFreezeAmt = nowPrice.multiply(new BigDecimal(stock.getContractSize())).multiply(new BigDecimal(buyNum)).divide(new BigDecimal(stock.getSiteLever()), 2, 4);
|