| | |
| | | return ServerResponse.createByErrorMsg("平仓失败,订单不存在"); |
| | | } |
| | | User user = this.userMapper.selectById(userPosition.getUserId()); |
| | | if (user.getIsLock() == 1) { |
| | | return ServerResponse.createByErrorMsg("账户已被限制交易"); |
| | | } |
| | | if (user == null) { |
| | | return ServerResponse.createByErrorMsg("平仓失败,用户不存在"); |
| | | } |
| | |
| | | return ServerResponse.createByErrorMsg("平仓失败,订单不存在", request); |
| | | } |
| | | User user = this.userMapper.selectById(userPosition.getUserId()); |
| | | if (user.getIsLock() == 1) { |
| | | return ServerResponse.createByErrorMsg("账户已被限制交易", request); |
| | | } |
| | | if (user == null) { |
| | | return ServerResponse.createByErrorMsg("平仓失败,用户不存在", request); |
| | | } |
| | |
| | | // StringBuffer gid = new StringBuffer(); |
| | | // gid.append(stockSubscribe.getStockType()!=null?stockSubscribe.getStockType():""); |
| | | // gid.append(userStockSubscribe.getNewCode()!=null?userStockSubscribe.getNewCode():"stock code invaild"); |
| | | userPosition.setStockGid(stock.getStockType()); |
| | | userPosition.setStockGid("IN"); |
| | | userPosition.setBuyOrderId(GeneratePosition.getPositionId()); |
| | | userPosition.setBuyOrderTime(new Date()); |
| | | userPosition.setBuyOrderPrice(userStockSubscribe.getBuyPrice()); |