1
zj
9 hours ago d615fc515fc52d6ed970c11d59a017e48de4be32
src/main/java/com/nq/service/impl/UserFundsPositionServiceImpl.java
@@ -9,6 +9,7 @@
import com.nq.dao.UserMapper;
import com.nq.pojo.*;
import com.nq.service.*;
import com.nq.utils.TradingDayUtil;
import com.nq.utils.DateTimeUtil;
import com.nq.utils.KeyUtils;
import com.nq.utils.stock.BuyAndSellUtils;
@@ -135,7 +136,7 @@
        if (siteProduct.getRealNameDisplay() && (StringUtils.isBlank(user.getRealName()) || StringUtils.isBlank(user.getIdCard()))) {
            return ServerResponse.createByErrorMsg("下单失败,请先实名认证");
        }
        if(siteProduct.getHolidayDisplay()){
        if(TradingDayUtil.shouldBlockTradingToday(siteProduct)){
            return ServerResponse.createByErrorMsg("周末或节假日不能交易!");
        }
        BigDecimal user_enable_amt = user.getEnableAmt();
@@ -341,7 +342,7 @@
        userPosition.setIsLock(Integer.valueOf(0));
        userPosition.setOrderLever(lever);
        userPosition.setOrderTotalPrice(buy_amt);
        BigDecimal buy_fee_amt = buy_amt.multiply(siteSetting.getBuyFee()).setScale(2, 4);
        BigDecimal buy_fee_amt = com.nq.utils.TradeFeeUtil.calcBuyFee(buy_amt, siteSetting.getBuyFee());
        log.info("用户购买手续费(配资后总资金 * 百分比) = {}", buy_fee_amt);
        userPosition.setOrderFee(buy_fee_amt);
@@ -429,7 +430,7 @@
        if (siteProduct.getRealNameDisplay() && user.getIsLock().intValue() == 1) {
            return ServerResponse.createByErrorMsg("平仓失败,用户已被锁定");
        }
        if(siteProduct.getHolidayDisplay()){
        if(TradingDayUtil.shouldBlockTradingToday(siteProduct)){
            return ServerResponse.createByErrorMsg("周末或节假日不能交易!");
        }