| | |
| | | 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()); |