| | |
| | | package com.yami.trading.api.controller.exchange; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @ApiOperation("获取欧元英镑汇率") |
| | | public Result getList() throws Exception { |
| | | String partyId = SecurityUtils.getCurrentUserId(); |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | List<Object> data = new ArrayList<>(); |
| | | List<ExchangeRate> list = this.userRateConfigService.findUserConfigList(partyId); |
| | | for (ExchangeRate exchangeRate : list) { |
| | | Map<String, Object> rate = new HashMap<>(); |
| | |
| | | rate.put("name", exchangeRate.getName()); |
| | | rate.put("currency_symbol", exchangeRate.getCurrencySymbol()); |
| | | rate.put("rate", exchangeRate.getRata()); |
| | | data.put("ExchangeRate", rate); |
| | | data.add(rate); |
| | | } |
| | | |
| | | |
| | | return Result.succeed(data); |
| | | } |
| | | |