| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return Result.succeed(data); |
| | | } |
| | | |
| | | /** |
| | | * 获取 汇率 |
| | | */ |
| | | @GetMapping(action + "getList.action") |
| | | @ApiOperation("获取欧元英镑汇率") |
| | | public Result getList() throws Exception { |
| | | String partyId = SecurityUtils.getCurrentUserId(); |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | List<ExchangeRate> list = this.userRateConfigService.findUserConfigList(partyId); |
| | | for (ExchangeRate exchangeRate : list) { |
| | | Map<String, Object> rate = new HashMap<>(); |
| | | rate.put("currency", exchangeRate.getCurrency()); |
| | | rate.put("name", exchangeRate.getName()); |
| | | rate.put("currency_symbol", exchangeRate.getCurrencySymbol()); |
| | | rate.put("rate", exchangeRate.getRata()); |
| | | data.put("ExchangeRate", rate); |
| | | } |
| | | |
| | | |
| | | return Result.succeed(data); |
| | | } |
| | | |
| | | @GetMapping(action + "userSetRate.action") |
| | | @ApiOperation("设置计价方式") |
| | | public Object userSetRate(@RequestParam String rateId) throws IOException { |