| | |
| | | List<Realtime> list = this.dataService.realtime(symbol); |
| | | if (0 == list.size()) { |
| | | // throw new BusinessException(symbol.toUpperCase() + "行情获取异常,请重试"); |
| | | throw new YamiShopBindException("行情获取异常,请重试"); |
| | | throw new YamiShopBindException("Failed to fetch market data, please try again"); |
| | | } |
| | | Realtime realtime = list.get(0); |
| | | symbol_close = realtime.getClose().doubleValue(); |
| | | } |
| | | if (0 == symbol_close) { |
| | | // throw new BusinessException(symbol.toUpperCase() + "行情获取异常,请重试"); |
| | | throw new YamiShopBindException("行情获取异常,请重试"); |
| | | throw new YamiShopBindException("Failed to fetch market data, please try again"); |
| | | } |
| | | ExchangeRate ex = this.exchangeRateService.findBy(Constants.OUT_OR_IN_DEFAULT, currency); |
| | | // 支付比率=支付币种汇率*上架币种实时行情价/币种单价;例如,支付比率95%,1USDT=7.3CNY*1*95%=6.935CNY |