| | |
| | | if (CollectionUtils.isNotEmpty(stockSubscribes)) { |
| | | List<String> codeList = stockSubscribes.stream().map(StockSubscribe::getCode).collect(Collectors.toList()); |
| | | List<UserStockSubscribe> userStockSubscribes = userStockSubscribeMapper.selectList(new LambdaQueryWrapper<UserStockSubscribe>() |
| | | .eq(UserStockSubscribe::getStatus, 5).in(UserStockSubscribe::getNewCode, codeList)); |
| | | .eq(UserStockSubscribe::getStatus, 4).in(UserStockSubscribe::getNewCode, codeList)); |
| | | //订单转持仓 |
| | | userStockSubscribes.forEach(f -> { |
| | | ServerResponse serverResponse = iUserPositionService.newStockToPosition(f.getId(),BigDecimal.ZERO);//转持仓 |
| | | if(serverResponse.isSuccess()){ |
| | | f.setStatus(6); |
| | | f.setStatus(5); |
| | | userStockSubscribeMapper.updateById(f); |
| | | }else{ |
| | | log.info("新股上市定时任务失败申购订单id:"+f.getId()+",失败原因:"+serverResponse.getMsg()); |