| | |
| | | } |
| | | |
| | | if (newSharesConfig.getLockDay() > 0) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(userPromiseRecords.get(0).getCreateTime()); |
| | | calendar.add(Calendar.DAY_OF_YEAR,newSharesConfig.getLockDay()); |
| | | if (System.currentTimeMillis() < calendar.getTimeInMillis()){ |
| | | 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("新股锁定中无法卖出"); |
| | | } |
| | | } |