| | |
| | | private final AtomicBoolean ballot = new AtomicBoolean(false); |
| | | |
| | | |
| | | @Scheduled(cron = "0 0/10 * * * ?") |
| | | // @Scheduled(cron = "0 0/10 * * * ?") |
| | | public void ballot() { |
| | | if (ballot.get()) { // 判断任务是否在处理中 |
| | | return; |
| | |
| | | .eq(UserStockSubscribe::getStatus, 4).in(UserStockSubscribe::getNewCode, codeList)); |
| | | //订单转持仓 |
| | | userStockSubscribes.forEach(f -> { |
| | | ServerResponse serverResponse = iUserPositionService.newStockToPosition(f.getId());//转持仓 |
| | | ServerResponse serverResponse = iUserPositionService.newStockToPosition(f.getId(),BigDecimal.ZERO);//转持仓 |
| | | if(serverResponse.isSuccess()){ |
| | | f.setStatus(5); |
| | | userStockSubscribeMapper.updateById(f); |