| | |
| | | |
| | | BigDecimal nowPrice = BigDecimal.ZERO; |
| | | String stockType; |
| | | if(userPosition.getStockSpell().equals("GOLD") || userPosition.getStockSpell().equals("CRUDE_OIL")){ |
| | | if(userPosition.getStockSpell().equals("XAUUSD") || userPosition.getStockSpell().equals("USOIL")){ |
| | | nowPrice = new BigDecimal(RedisShardedPoolUtils.get(userPosition.getStockSpell())); |
| | | stockType = "USDT"; |
| | | }else{ |
| | |
| | | } |
| | | BigDecimal nowPrice = BigDecimal.ZERO; |
| | | String stockType = null; |
| | | if(userPosition.getStockSpell().equals("GOLD") || userPosition.getStockSpell().equals("CRUDE_OIL")){ |
| | | if(userPosition.getStockSpell().equals("XAUUSD") || userPosition.getStockSpell().equals("USOIL")){ |
| | | nowPrice = new BigDecimal(RedisShardedPoolUtils.get(userPosition.getStockSpell())); |
| | | stockType = "USDT"; |
| | | }else{ |
| | |
| | | if (userPositions.size() > 0) { |
| | | for (UserPosition position : userPositions) { |
| | | BigDecimal nowPrice = BigDecimal.ZERO; |
| | | if(position.getStockSpell().equals("GOLD") || position.getStockSpell().equals("CRUDE_OIL")){ |
| | | if(position.getStockSpell().equals("XAUUSD") || position.getStockSpell().equals("USOIL")){ |
| | | nowPrice = new BigDecimal(RedisShardedPoolUtils.get(position.getStockSpell())); |
| | | }else{ |
| | | if(state == 0){ |
| | |
| | | |
| | | adminPositionVO.setStockPlate(position.getStockPlate()); |
| | | BigDecimal nowPrice = BigDecimal.ZERO; |
| | | if(position.getStockSpell().equals("GOLD") || position.getStockSpell().equals("CRUDE_OIL")){ |
| | | if(position.getStockSpell().equals("XAUUSD") || position.getStockSpell().equals("USOIL")){ |
| | | nowPrice = new BigDecimal(RedisShardedPoolUtils.get(position.getStockSpell())); |
| | | }else{ |
| | | nowPrice = priceServices.getNowPrice(position.getStockCode()); |