ipo
zyy3
2026-01-06 97f6fdc09138a2346b61ccc4c716e87ab58e590f
trading-order-service/src/main/java/com/yami/trading/service/ipo/impl/UserPromiseRecordServiceImpl.java
@@ -96,12 +96,21 @@
             throw new YamiShopBindException("未提交认缴记录");
         }
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(userPromiseRecords.get(0).getCreateTime());
        calendar.add(Calendar.DAY_OF_YEAR,newSharesConfig.getLockDay());
        if (System.currentTimeMillis() < calendar.getTimeInMillis()){
               throw new YamiShopBindException("新股锁定中无法卖出");
        }
         if (newSharesConfig.getLockDay() > 0) {
             if (applyNewSharesOrder.getUnLock() == null || applyNewSharesOrder.getUnLock() == 0) {
                 Calendar calendar = Calendar.getInstance();
                 calendar.setTime(userPromiseRecords.get(0).getCreateTime());
                 calendar.add(Calendar.DAY_OF_YEAR,newSharesConfig.getLockDay());
                 if (System.currentTimeMillis() < calendar.getTimeInMillis()){
                     throw new YamiShopBindException("新股锁定中无法卖出");
                 }
             }
         } else { //未设置周期 未解锁不能卖出
             if (applyNewSharesOrder.getUnLock() == null || applyNewSharesOrder.getUnLock() == 0) {
                 throw new YamiShopBindException("新股锁定中无法卖出");
             }
         }
         BigDecimal usdt=new BigDecimal("0");
         if (CollectionUtil.isNotEmpty(userPromiseRecords)){
             List<Realtime> realtimes = dataService.realtime(userPromiseRecords.get(0).getProductCode());