新版仿ok交易所-后端
1
zj
7 days ago 1004f3d16011f69894196bfd180ea539b76ba4e7
trading-order-service/src/main/java/com/yami/trading/service/miner/service/impl/MinerServiceImpl.java
@@ -114,7 +114,10 @@
      result.put("name", miner.getName());
      result.put("name_en", miner.getName_en());
      result.put("name_cn", miner.getName_cn());
      result.put("daily_rate", miner.getDaily_rate());
      // 用户端展示日利率;实际计息仍使用 daily_rate
      double displayDailyRate = miner.getShow_daily_rate();
      result.put("show_daily_rate", displayDailyRate);
      result.put("daily_rate", displayDailyRate);
      result.put("investment_min", miner.getInvestment_min());
      result.put("investment_max", miner.getInvestment_max());
      result.put("state", miner.getState());
@@ -126,7 +129,7 @@
         result.put("cycle", miner.getCycle());
         result.put("daily_rate", miner_test_profit);
      } else {
         result.put("all_rate", Arith.mul(miner.getDaily_rate(), 30));
         result.put("all_rate", Arith.mul(displayDailyRate, 30));
         result.put("cycle", miner.getCycle_close());
      }
@@ -135,7 +138,7 @@
      // 矿机购买时使用的币种,则产生
      String miner_buy_symbol = sysparaService.find("miner_buy_symbol").getSvalue();
      double symbol_profit = miner.getTest().equals("Y") ? miner_test_profit
            : Arith.div(Arith.mul(100, miner.getDaily_rate()), 100);// 100为单位的币种收益
            : Arith.div(Arith.mul(100, displayDailyRate), 100);// 100为单位的币种收益
      // 收益转化成U
      if (StringUtils.isNotEmpty(miner_buy_symbol) && !"usdt".equalsIgnoreCase(miner_buy_symbol)) {
         List<Realtime> realtime_list = this.dataService.realtime(miner_buy_symbol);
@@ -145,7 +148,7 @@
         } else {
            throw new BusinessException("行情获取异常,稍后再试");
         }
         symbol_profit = Arith.mul(symbol_profit, realtime.getClose());
         symbol_profit = Arith.mul(symbol_profit, realtime.getClose().doubleValue());
      }
      if (StringUtils.isNotEmpty(miner_profit_symbol) && !"usdt".equalsIgnoreCase(miner_profit_symbol)) {
@@ -156,7 +159,7 @@
         } else {
            throw new BusinessException("行情获取异常,稍后再试");
         }
         symbol_profit = Arith.div(symbol_profit, realtime.getClose());
         symbol_profit = Arith.div(symbol_profit, realtime.getClose().doubleValue());
         result.put("symbol_profit", symbol_profit);
      } else {
         result.put("symbol_profit", symbol_profit);