1
zj
2025-04-25 b6c57b550483b3f91685731a24df903898c3c077
src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
@@ -395,7 +395,7 @@
        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{
@@ -451,7 +451,7 @@
        }
        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{
@@ -745,7 +745,7 @@
        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){
@@ -1323,7 +1323,7 @@
        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());